11.05.2012, 23:09
Hello,i've this ticket command come:
But i got tag mismatch warning at most whole of it.What's wrong?
pawn Код:
CMD:tk(playerid, params[])
{
if(gTeam[playerid] != TEAM_COP) return 0;
if(sscanf(params, "ui", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tk <playerid> / <PlayerName>");
if(GetPVarInt(playerid,"TkTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before issuing a ticket again.");
if(GetDistanceBetweenPlayers(playerid,ID) < 10)
{
new pwl = GetPlayerWantedLevel(playerid);
new opname[24];
new pname[24];
new string[120];
GetPlayerName(playerid, pname, 24);
if(pwl >= 4) return SendClientMessage(playerid, red, "This suspect has more than 4 wanted level,you can't issue a ticket to him.Use /ar instead.");
GetPlayerName(ID, opname, 24);
format(string, 120, "You have been fined by %s(%d) - You have been charged $5,000", pname, playerid);
SendClientMessage(ID, COLOR_BLUE, string);
format(string, 120, "You have fined %s (%d). You have recieved a collection prize of 1500$.", opname, ID);
SendClientMessage(playerid, COLOR_BLUE, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i))continue;
if(gTeam[i] == TEAM_COP)
{
new copmsg[170];
format(copmsg, sizeof(copmsg), "%s (%d) has fined %s (%d).He is no longer wanted.",pname, playerid, opname, ID);
SendClientMessage(i, COLOR_BLUE, copmsg);
}
}
SetPlayerWantedLevel(ID, 0);
SetPlayerScore(playerid, 1);
GivePlayerMoney(playerid, 1500);
GivePlayerMoney(ID, -5000);
}
return 1;
}