Advertisement
Hardware

Exemplo

Oct 1st, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.78 KB | None | 0 0
  1. new tmp[256],idx,cmd[128];
  2. cmd = strtok(cmdtext,idx);
  3.  
  4. if(strcmp(cmd, "/x1", true) == 0)
  5.     {
  6.         tmp = strtok(cmdtext, idx);
  7.         if(!strlen(tmp))
  8.         {
  9.             SendClientMessage(playerid, COLOR_GRAD2, "[INFO] Use: /x1 [id1] [id2]");
  10.             return 1;
  11.         }
  12.  
  13.         id = strval(tmp);
  14.         if(IsPlayerConnected(id) == 0)
  15.         {
  16.             SendClientMessage(playerid,0xFF0000AA,"[ERRO] Player não conectado!");
  17.             return 1;
  18.         }
  19.  
  20.         if(PlayerInfo[playerid][pAdmin] < 3)
  21.         {
  22.             SendClientMessage(playerid, COLOR_GRAD2, "Você não está autorizado a usar este comando");
  23.             return 1;
  24.         }
  25.         new playerAtual[MAX_PLAYER_NAME],playerConvidado[MAX_PLAYER_NAME], msg[256];
  26.         GetPlayerName(id,playerAtual,sizeof(nickp));
  27.         GetPlayerName(playerid,playerConvidado,sizeof(mnick));
  28.         format(string, sizeof(string), "[Evento X1] %s vs %s", playerAtual,  playerConvidado);// Manda a mensagem
  29.         SendClientMessageToAll(COR_AMARELO, string);// Mensagem pra todos players online
  30.         SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);// Seta id1 pra essa posição
  31.         SetPlayerPos(id, 1416.107000,0.268620,1000.926000);// Seta id2 pra essa posição
  32.         SetPlayerInterior(playerid, 1);// Seta id1 Interior
  33.         SetPlayerInterior(id, 1);// Seta id2 Interior
  34.         SetPlayerHealth(playerid, 100);// Seta Vida id1
  35.         SetPlayerHealth(id, 100);// Seta Vida id2
  36.         SetPlayerArmour(playerid, 100);// Seta Colete id1
  37.         SetPlayerArmour(id, 100);// Seta Colete id2
  38.         GivePlayerWeapon(playerid, 24, 999);// Seta Desert id1
  39.         GivePlayerWeapon(id, 24, 999);// Seta Desert id2
  40.         GivePlayerWeapon(playerid, 25, 999);// Seta Shotgun id1
  41.         GivePlayerWeapon(id, 25, 999);// Seta Shotgun id2
  42.         return true;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement