Guest User

Untitled

a guest
Oct 13th, 2010
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. dcmd_warn(playerid, params[])
  2. {
  3. new warnID; new player1; new Reason;
  4. if(Player[playerid][admin] < 1) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command");
  5. if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
  6. if(Player[playerid][admin] < Player[playerid][admin]) return SendClientMessage(playerid,COLOR_RED,"You can`t WARN a high ranked admin");
  7. if(sscanf(params, "u", warnID, Reason))return SendClientMessage(playerid, COLOR_RED, "/warn [playerid] [reason]");
  8. else {
  9. new playerfile[100], wString[256], wString2[256], wString3[256], Name[MAX_PLAYER_NAME];
  10. SetPVarInt(warnID, "PlayerWarnings", GetPVarInt(playerid, "PlayerWarnings")+1);
  11. GetPlayerName(playerid, Name,sizeof(Reason));
  12. format(wString, sizeof(wString), "**(ADMIN WARN)*** %s(%d) %s Read /Rules",Name, warnID, Reason);
  13. format(wString2, sizeof(wString2), "%s(%d) (Has Been Forced To Read Rules)",Name, warnID);
  14. format(wString3, sizeof(wString3), "You Have Been WARNED By Admin For: %s [%d/3]",Reason);
  15. SendClientMessageToAll(COLOR_RED, wString);
  16. SendClientMessageToAll(COLOR_RED, wString2);
  17. SendClientMessage(warnID, COLOR_RED, wString3);
  18. if(GetPVarInt(playerid, "PlayerWarnings")>=3)Kick(warnID);
  19. }
  20. return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment