09.03.2009, 19:06
pawn Код:
dcmd_report(playerid, params[])
{
new id, reason, pName[MAX_PLAYER_NAME], idName[MAX_PLAYER_NAME], report[1024];
if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /report [playerid/partofname] [reason]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_DARKRED, "Player not found");
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,idName,sizeof(idName));
format(report,sizeof(report),"%s[%d] reported %s[%d] Reason: %s",pName,playerid,idName,id,reason);
SendClientMessage(playerid,COLOR_GREEN,report);
for(new i; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i,COLOR_GREEN,report);
return 1;
}
return 1;
}
return 1;
}
/report [id] [(one single letter]
if you type more then 1 letter on the Reason, It wont work :S
Example:
"/report 0 g" works...
"/report 0 non-rp" doesn't work...
Can someone help pleasE? =)