08.09.2009, 20:08
hello,
lately i wanted to add /armall command to my server, and i didnt want to be bothered scripting it, so i got the command from V admin by Yaheli
heres the command from the V admin
and i turned it into this
well i tested it and it worked fine, but after 1 usage the command is not valid anymore.
why is that?
lately i wanted to add /armall command to my server, and i didnt want to be bothered scripting it, so i got the command from V admin by Yaheli
heres the command from the V admin
Код:
if(strcmp(cmd, "/giveallgun", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 6) return DenyMessage(playerid, 6); new tmp2[256]; tmp = strtok(cmdtext, idx); new gun = strval(tmp); tmp2 = strtok(cmdtext, idx); new ammo = strval(tmp2); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveallgun [weaponid] [ammo]"); if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveallgun [weaponid] [ammo]"); for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) GivePlayerWeapon(i, gun, ammo); } return 1; } #endif
Код:
if(strcmp(cmd, "/giveeveryonegun", true) == 0) { if(PlayerInfo[playerid][pAdminLevel] >= 4) return (playerid, 6); new tmp2[256]; tmp = strtok(cmdtext, idx); new gun = strval(tmp); tmp2 = strtok(cmdtext, idx); new ammo = strval(tmp2); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveallgun [weaponid] [ammo]"); if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveallgun [weaponid] [ammo]"); for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) GivePlayerWeapon(i, gun, ammo); } return 1; }
why is that?