06.07.2010, 13:50
Hey guys, I'm trying to make a /wanted [playerid] [wantedlevel] command. but it is still kinda hard for me. I know that I am asking alot of you guys. But I really need an example and a little explanation of how to do it.
I'm thanking you in advance.
BTW:
I know I have to work with these things:
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
ButI don't know how to use them and what they actually do.XD
Now having this:
I'm thanking you in advance.
BTW:
I know I have to work with these things:
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
ButI don't know how to use them and what they actually do.XD
Now having this:
Код:
if(strcmp(cmd,"/wanted", true) == 0) { new name [MAX_PLAYER_NAME]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, 0xE3E3E3FF, "USAGE: /wanted [playerid]"); giveplayerid = strval(tmp); if(IsPlayerConnected(giveplayerid)) if(sapd[giveplayerid] >= 1) { { if(sapd[playerid] >= 1) { SetPlayerWantedLevel(giveplayerid,1); } else { SendClientMessage(playerid,0xE3E3E3FF,"Je mag dit niet doen"); } } } return 1; }