28.05.2010, 17:34
Well okay, When ever i try to get this command to work, My Pawno freezes then shuts, Can someone find out the problem?
Thanks to everyone who attempts to help me.
-SiimSiim
Код:
if(strcmp(cmd, "/Giveme", true) == 0) { if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 5) { if(IsAtBar(playerid)) { new adminx[256]; adminx = strtok(cmdtext, idx); if(!strlen(adminx)) { SendClientMessage(playerid, COLOR_GREEN, "|_____________________ Admin Giveme____________________|"); SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Giveme [name]"); SendClientMessage(playerid, COLOR_GREY, "Health, Armour, Deagle, Pistol, SDPistol, Mac10, AK47"); SendClientMessage(playerid, COLOR_GREY, "M4, Sniper, Money, "); SendClientMessage(playerid, COLOR_LIGHTRED, "[INFO] All guns come with 500 bullets, Money is 1000000$."); SendClientMessage(playerid, COLOR_GREEN, "|______________________________________________________|"); return 1; } if(strcmp(adminx,"Health",true) == 0) { SetPlayerHealth(playerid, 100); } else if(strcmp(adminx,"Armour",true) == 0) { SetPlayerArmour(playerid, 100); } else if(strcmp(adminx,"Deagle",true) == 0) { GivePlayerWeapon(playerid,24,500); } else if(strcmp(adminx,"Pistol",true) == 0) { GivePlayerWeapon(playerid,22,500); } else if(strcmp(adminx,"SDPistol",true) == 0) { GivePlayerWeapon(playerid,23,500); } else if(strcmp(adminx,"Mac10",true) == 0) { GivePlayerWeapon(playerid,28,500); } else if(strcmp(adminx,"AK47",true) == 0) { GivePlayerWeapon(playerid,30,500); } else if(strcmp(adminx,"M4",true) == 0) { GivePlayerWeapon(playerid,31,500);; } else if(strcmp(adminx,"Sniper",true) == 0) { GivePlayerWeapon(playerid,34,500); } else if(strcmp(adminx,"Money",true) == 0) { GivePlayerMoney(playerid, 1000000); } else { SendClientMessage(playerid, COLOR_WHITE, "[INFO] That name is not on the list!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "[INFO] You are not an Admin!"); return 1; } } } return 1; }
-SiimSiim