26.08.2013, 11:33
Can someone help me with this command? It doesn't work
pawn Код:
if (!strcmp("/gun", cmd, true)) {
tmp = strtok(cmdtext, idx);
if(BusinessInfo[InsideBiz[playerid]][bType] != 5) return SendClientMessage(playerid, COLOR_RED, "sth!");
if (!strlen(tmp)) {
SendClientMessage(playerid, 0x00E800FF, "Usage: /gun [name] (shotgun,uzi,mp5,ak47,m4,sniper)");
return 1;
}
if (!strcmp(tmp, "shotgun", true)) GivePlayerWeapon(playerid,249,600);
else if (!strcmp(tmp, "uzi", true)) GivePlayerWeapon(playerid,352,600);
else if (!strcmp(tmp, "mp5", true)) GivePlayerWeapon(playerid,353,600);
else if (!strcmp(tmp, "ak47", true)) GivePlayerWeapon(playerid,355,600);
else if (!strcmp(tmp, "m4", true)) GivePlayerWeapon(playerid,356,600);
else if (!strcmp(tmp, "sniper", true)) GivePlayerWeapon(playerid,358,600);
else SendClientMessage(playerid, 0x00E800FF, "Invalid weapon!");
GivePlayerMoney(playerid,-200);
BusinessInfo[InsideBiz[playerid]][bMoney] += 200;
return 1;
}