dylan4021

ir admin

Jun 17th, 2011
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.48 KB | None | 0 0
  1. CMD:ir(playerid, params[])
  2. {
  3.     new string[128];
  4.     new interiorid;
  5.     new Float:pX,
  6.         Float:pY,
  7.         Float:pZ;
  8.  
  9.     if(DylanInfo[playerid][dAdmin] <= 0) return SendClientMessage(playerid, Vermelho,"[ERRO]: Seu nível de Admin é insuficiente.");
  10.  
  11.     if(sscanf(params, "u", Outroplayerid)) return SendClientMessage(playerid, Branco, "Use: /ir [ID/Nome]");
  12.  
  13.     if(!IsPlayerConnected(Outroplayerid)) return SendClientMessage(playerid, Vermelho, "Jogador Invalido/ Não Conectado");
  14.  
  15.     if(IsPlayerInAnyVehicle(playerid)) {
  16.         if(GetPlayerInterior(Outroplayerid) >= 1) return SendClientMessage(playerid, Vermelho, "Você não pode ir em um jogador que esteja em um iterior");
  17.         GetPlayerName(Outroplayerid, NomedoCara, sizeof(NomedoCara));
  18.         format(string, sizeof(string), "Você foi até: %s", NomedoCara);
  19.         SendClientMessage(playerid, Verde_Folha, string);
  20.         GetPlayerPos(Outroplayerid, pX, pY, pZ);
  21.         SetVehiclePos(GetPlayerVehicleID(playerid), pX+1, pY+1, pZ);
  22.     }
  23.     if(!IsPlayerInAnyVehicle(playerid)) {
  24.         GetPlayerName(Outroplayerid, NomedoCara, sizeof(NomedoCara));
  25.         format(string, sizeof(string), "Você foi até: %s", NomedoCara);
  26.         SendClientMessage(playerid, Verde_Folha, string);
  27.         GetPlayerPos(Outroplayerid, pX, pY, pZ);
  28.         SetPlayerPos(playerid, pX+1, pY+1, pZ);
  29.         interiorid = GetPlayerInterior(Outroplayerid);
  30.         SetPlayerInterior(playerid, interiorid);
  31.     }
  32.     return true;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment