Bit Of Problem...
#1

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
Reply
#2

Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str);
Might work.
Reply
#3

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
Reply
#4

Was an extra bracket. Should be fine now.
Reply
#5

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
Reply
#6

Quote:
Originally Posted by DJDhan
Under OnPlayerConnect
Код:
new str[128];
format(str,128,"/snow");
CallLocalFunction("OnPlayerCommandText", "is", playerid, str);
Might work.
OnPlayerCommandText != Function

Reply
#7

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));
Reply
#8

Same Problem :/
Reply
#9



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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)