![]() |
having a problem with onActionPlayerOnline event - help
i've been trying to do stuff such as add weapons etc as soon as players login. but for some reason serverside and clientside that event hasn't done it for me. can someone tell me what i'm doing wrong with it? thanks
|
Hmm, I think this is what you're looking for:
PHP Code:
|
Quote:
|
Make sure you're using onActionPlayerOnline() in the Control-NPC. onPlayerLogin() can be used in different NPCs/weapons/etc however.
|
so onActionPlayerOnline is only used for the control-NPC?
|
Quote:
|
Quote:
Explanation: it is invoked when a player logs on. Can be put in weapon NPCs and DBNPcs. Example if used in a weapon/GUI-script: *example* http://gscript.graal.net/onActionPlayerOnline also onPlayerLogin doesn't even exist there |
Pretty certain that wiki article is incorrect. I don't think the player object is passed as a parameter, either (player will be in scope; for onPlayerLogin it won't be in scope and will be passed).
In weapons and NPCs (including Control-NPC), you can use onPlayerLogin(pl). If I'm not mistaken, you can only use onActionPlayerOnline() in Control-NPC. edit: yes, just tested, everything above is correct, the wiki article is wrong |
You can't really trust that list regarding available stuff. You can get a list though by doing the following:
Use 'Run' and type in the following: HTML Code:
Path:\To\Your\Graal\Client\Graal6.exe -listscriptfunctionsAfter that check your Graal folder. There should be a file called scriptfunctions_client.txt. That list includes all (I believe) currently available functions |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 08:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.