15.04.2015, 07:48
Try this ,
and can you show me the Duty codes?
Код:
CMD:ticket(playerid, params[]) { new id, reason, str[120], x,y,z; if(pInfo[playerid][pFaction] == 1) { if(Duty[playerid] == 1) { if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, COLOR_WHITE, "** /ticket [playerid] [reasonn]"); else if(id == playerid) return SendClientMessage(playerid, -1, "** you can't give ticket for yourself"); else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "** that player is not connected"); else if(pInfo[playerid][pFacrank] < pInfo[id][pFacrank]) return SendClientMessage(playerid, -1, "** you can't give ticket for high rank"); else if(!IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z) && GetPlayerInterior(playerid) == GetPlayerInterior(id) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(id)) return SendClientMessage(playerid, -1, "** you must near the wanted player"); else if(GetPlayerWantedLevel(id) == 0) return SendClientMessage(playerid, -1, "** that player have no wanted level"); else if(GetPlayerWantedLevel(id) > 1) { GivePlayerMoney(id, -10000); SetPlayerWantedLevel(id, 0); format(str, sizeof(str), "[POLICE]: {FFFFFF}Players %s telah ditilang oleh pak polisi %s karena %s", id, GetName(playerid), reason); SendClientMessageToAll(COLOR_BLUE, str); SendClientMessage(id, -1, "** Kau telah ditilang dan harus membayar sebesar {FF0000}$10.000"); format(str, sizeof(str), "[POLICE]: Kau telah menilang %s dan mendapatkan uang sebesar {00FF00}$1000 {FFFFFF}dan 1 score point", id); SendClientMessage(playerid, -1, str); GivePlayerMoney(playerid, 1000); SetPlayerScore(playerid, GetPlayerScore(playerid)+= 1); } } else return SendClientMessage(playerid, -1, "** you must ON Duty"); } else return SendClientMessage(playerid, -1, "** you are not police"); return 1; }