17.07.2012, 10:28
Hello guys, if I type a cmd begining with W like /wdasdsa, /weatherall, /wfdsfs etc. I receive /weaponid [id]
Here is the script involved with /weaponid:
I'm really confused. If you can help me I'll be very happy, thank you all in advance.
Here is the script involved with /weaponid:
Код:
if(strcmp(cmd, "/weaponid", true) == 1) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GREY, " your no authorized to use that command . "); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /weaponid [id]"); return 1; } new playa; playa = strval(tmp); SendClientMessage(playerid, COLOR_GRAD1, "User online:"); foreach (Player, i) { if(GetPVarInt(i, "PlayerLogged") == 1) { if(GetPlayerWeapon(i) == playa) { GetPlayerName(i, sendername, sizeof(sendername)); format(string, sizeof(string), "** ID: %d ** %s", i, sendername); SendClientMessage(playerid, COLOR_GRAD2, string); } } } } return 1; }