Bit Of Problem... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bit Of Problem... (
/showthread.php?tid=156132)
Bit Of Problem... -
matthewdriftking - 21.06.2010
Ok 1st sorry for my bad english..
I want to ask if someone know when a player connect the server type him a command!
Example: When a player connect the server type him /snow
Re: Bit Of Problem... -
DJDhan - 21.06.2010
Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str);
Might work.
Re: Bit Of Problem... -
matthewdriftking - 21.06.2010
Quote:
Originally Posted by DJDhan
Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str));
Might work.
|
C:\Documents and Settings\Spanner\Desktop\Stunts Forever\gamemodes\stuntsforever.pwn(2252) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Spanner\Desktop\Stunts Forever\gamemodes\stuntsforever.pwn(2252) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Spanner\Desktop\Stunts Forever\gamemodes\stuntsforever.pwn(2252) : warning 215: expression has no effect
Re: Bit Of Problem... -
DJDhan - 21.06.2010
Was an extra bracket. Should be fine now.
Re: Bit Of Problem... -
matthewdriftking - 21.06.2010
Quote:
Originally Posted by DJDhan
Was an extra bracket. Should be fine now.
|
No errors now, But the command isn't working! by the way the command is on a filter scirpt
Re: Bit Of Problem... -
Mina - 21.06.2010
Quote:
Originally Posted by DJDhan
Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str);
Might work.
|
OnPlayerCommandText != Function
Re: Bit Of Problem... -
DJDhan - 21.06.2010
If you have the command in the FS and if you want to call from within the FS then use the code
Quote:
Originally Posted by DJDhan
Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str));
|
under OnPlayerConnect in the FS.
If you want to put the call under the GM's OnPlayerConnect, use
Код:
new str[128];
format(str,128,"/snow");
CallRemoteFunction("OnPlayerCommandText", "is", playerid, str));
Re: Bit Of Problem... -
matthewdriftking - 21.06.2010
Same Problem :/
Re: Bit Of Problem... -
matthewdriftking - 21.06.2010
If you want to put the call under the GM's OnPlayerConnect, use
Код:
new str[128];
format(str,128,"/snow");
CallRemoteFunction("OnPlayerCommandText", "is", playerid, str));
[/quote]
No warnings/Errors but when someone join nothing appear