03.04.2009, 23:53
Oh Fuck guys!!
When i warn someone.
Its says:
Taz86 Was bla bla bla by Admin Taz86
And i cant warn myself.
I did other ID.
What to do!?
When i warn someone.
Its says:
Taz86 Was bla bla bla by Admin Taz86
And i cant warn myself.
I did other ID.
What to do!?
Код:
if(strcmp(cmd,"/warn",true)==0) { if(PlayerInfo[playerid][pAdmin] >= 2) tmp = strtok(cmdtext, idx); new otherplayer = ReturnUser(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]"); if(otherplayer == playerid) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't warn yourself !"); if(PlayerInfo[otherplayer][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't warn Admins!"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]"); if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player ID."); new year, month, day; getdate(year, month, day); PlayerInfo[otherplayer][pWarns] ++; format(string, sizeof(string), "%s was warned by Administrator %s, Reason: (%s)", giveplayer, sendername,result); SendClientMessageToAll(COLOR_RED, string); return 1; }