30.12.2011, 06:59
ok, so it complies with no errors but ingame i type /frisk it tells me i need to put a playerid, but when i put the id it says unknown command, ignore the bad indentation doenst paste good here
Код HTML:
if (strcmp("/frisk", cmdtext, true) == 0) { new teamid = GetPlayerTeam(playerid); if(teamid == 3) { tmp = strtok(cmdtext, idx); if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /frisk[player id]"); new playeree = strval(tmp); if(!IsPlayerConnected(playeree)) return SendClientMessage(playerid, COLOR_WHITE, "Player is not connected."); new playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], gunname[32]; GetPlayerName(playeree, playername, MAX_PLAYER_NAME); GetPlayerName(playerid, adminname, MAX_PLAYER_NAME); new weaponid = GetPlayerWeapon(playeree); new money = GetPlayerMoney(playeree); GetWeaponName(weaponid ,gunname,sizeof(gunname)); format(string, sizeof(string), "|%s Has Weapon %s| money %i|", playername, gunname, money); SendClientMessage(playerid, COLOR_GOLD, string); format(string, sizeof(string), "%s Has frisked you for illegal iteams", adminname); SendClientMessage(playeree, COLOR_GOLD, string); } else if(teamid != 3) { SendClientMessage(playerid, COLOR_ROYALBLUE, "You Are Not A Officer"); } return 1; }