04.10.2010, 14:59
When i use these commands comes up as UNKNOWN COMMAND
Код:
if(strcmp(cmd, "/myguns", true) == 0) { SendClientMessage(playerid,COLOR_RED, "_________GUN INVENTORY_________"); new string[128]; if(PlayerData[playerid][AK47] == 0 && PlayerData[playerid][Colt] == 0 && PlayerData[playerid][Deagle] == 0 && PlayerData[playerid][Shotgun] == 0 && PlayerData[playerid][Uzi] == 0 && PlayerData[playerid][Silenced] == 0 && PlayerData[playerid][Tec9] == 0 && PlayerData[playerid][MP5] == 0) {SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You don't have any guns!"); } if(PlayerData[playerid][AK47] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got an AK47 assault rifle"); } if(PlayerData[playerid][Deagle] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a handgun model desert eagle"); } if(PlayerData[playerid][Tec9] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a machine gun model Tec9"); } if(PlayerData[playerid][Uzi] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got an Israel UZI"); } if(PlayerData[playerid][Silenced] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a silenced pistol"); } if(PlayerData[playerid][Shotgun] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a shotgun"); } if(PlayerData[playerid][Colt] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a handgun model colt45"); } if(PlayerData[playerid][MP5] == 1){SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You got a MP5 machine gun"); } format(string, sizeof(string), "SERVER MESSAGE: You got %d gun bullets!",PlayerData[playerid][Bullets]); SendClientMessage(playerid,COLOR_RED, string); return 1; } if(strcmp(cmd, "/getammo", true) == 0) { if(PlayerData[playerid][Gundealer] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not a Official Gundealer"); { if(PlayerToPointa(3.0, playerid, 2150.3938,-2266.0227,13.3064)) { if(PlayerData[playerid][AK47] == 0 && PlayerData[playerid][Colt] == 0 && PlayerData[playerid][Deagle] == 0 && PlayerData[playerid][Shotgun] == 0 && PlayerData[playerid][Uzi] == 0 && PlayerData[playerid][Silenced] == 0 && PlayerData[playerid][Tec9] == 0 && PlayerData[playerid][MP5] == 0) {SendClientMessage(playerid,COLOR_YELLOW,"SERVER MESSAGE: You don't have any guns!"); } new ammount,tmp[256]; tmp = strtok(cmdtext, idx); ammount = strval(tmp); if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_RED, "CORRECT USAGE: /getammo [ammount of bullets]"); { if(ammount < 1 || ammount > 200) { SendClientMessage(playerid, COLOR_RED, "SERVER MESSAGE: The ammo bullets must be between 1-200!"); return 1; } new pName[24],string[128]; tmp = strtok(cmdtext, idx); GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "%s has opened a box and takes out all the available ammo inside it.",pName); SendClientMessageToAll(0xFFFF00AA, string); PlayerData[playerid][Bullets] = ammount; ApplyAnimation(playerid,"INT_SHOP","shop_lookA",4.1, 1, 0, 0, 1, 1); } SendClientMessage(playerid, COLOR_RED, "SERVER MESSAGE: You are not at the Warehouse!"); return 1; } } } }