Guest User

Untitled

a guest
Sep 1st, 2013
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. CMD:prender(playerid, params[])
  2. {
  3. if(PlayerInfo[playerid][Admin] < 2) return SendClientMessage(playerid, COR_ERRO,"ERRO: Você não tem permissão para usar este comando.");
  4. new id,minutos,motivo[20],string[128];
  5. if(sscanf(params,"uis",id,minutos,motivo)) return SendClientMessage(playerid, COR_USOCORRETO,"Uso: /prender [id] [minutos] [motivo]");
  6. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO,"ERRO: ID Inválido");
  7. if(minutos > 60) return SendClientMessage(playerid, COR_ERRO,"ERRO: O máximo de minutos é 60!");
  8.  
  9. SetPlayerInterior(id, 5);
  10. SetPlayerPos(id, 322.197998,302.497985,999.148437);
  11. SetPlayerSpecialAction(id, 24);
  12.  
  13. Preso[id] = 1;
  14. PlayerInfo[id][pPresoADM] = 1;
  15. PlayerInfo[id][pTempoPreso] = 60*minutos;
  16. Rptlido[playerid] += 1;
  17.  
  18. format(string, sizeof(string),"admCMD: %s foi preso pelo %s %s por %d minutos | Motivo: %s",Nome(id),AccountName(playerid),Nome(playerid),minutos,motivo);
  19. SendClientMessageToAll(0xFA8072AA, string);
  20. WriteLog("prender", String);
  21. return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment