13.12.2009, 10:37
Guys i have problem with my /rp command here is the command
but it wont work so good ... i want when i type /rp id reason it will say ''You Have Been Reported By Officer (name)(id) For Criminal
reason , what player type in) how i can do this ?
Код:
CMD:rp(playerid, params[])
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
new plvl;
GetPlayerWantedLevel(plvl);
new string[256];
new
giveplayerid,
reason[64];
if (sscanf(params, "uz", giveplayerid,reason))return SendClientMessage(playerid, 0xFF9900AA, "Usage: \"/rp [playerid/name] [reason]\"");
else if (gTeam[playerid] != TEAM_COP)return SendClientMessage(playerid,0xFF9900AA,"Only Cops Can Use This Command!");
else if (giveplayerid == INVALID_PLAYER_ID)return SendClientMessage(playerid, 0xFF9900AA, "Player Not Found");
//else if (giveplayerid == playerid)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Yourself!");
else if (GetDistanceBetweenPlayers(playerid,giveplayerid) > 4)return SendClientMessage(playerid,0xFF9900AA,"This Player Is Out Of Rage!");
else if (giveplayerid == TEAM_COP)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Law Enforcement Officer");
else if (IsJailed[giveplayerid] == true)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Prisoners!");
else
{
format(reason, sizeof (reason), "You Have Been Reported By Officer %s(%d)", reason[0] ? ("For Criminal:"):(""),playername,playerid,reason);
SendClientMessage(giveplayerid, 0x800080AA, reason);
SetPlayerWantedLevel(giveplayerid,plvl +1);
return 1;
}
}
reason , what player type in) how i can do this ?

