30.09.2009, 15:33
Yes but if i put it in onplayercommand text like this
I get these erors
Код:
#include <a_samp>
#define POLICE 1
#define ARMY 2
#define FBI 3
forward IsPlayerInPolice(playerid);
forward IsPlayerInArmy(playerid);
forward IsPlayerInFbi(playerid);
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx;
new giveplayername[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new string[128];
cmd = strtok(cmd,idx);
{
if(strcmp("/command", cmdtext, true, 7) == 0)
{
return 1;
}
return 0;
}
Код:
C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(23) : error 017: undefined symbol "strtok" C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(23) : error 033: array must be indexed (variable "cmd") C:\Documents and Settings\Administrator\Desktop\Jub commands.pwn(33) : error 030: compound statement not closed at the end of file (started at line 17)

