Niko_Hs

[COMMAND]Goto

Aug 4th, 2011
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.78 KB | None | 0 0
  1. //Nota* Non è un Fs Solo comando.
  2.  
  3.  
  4. public OnPlayerCommandText(playerid, cmdtext[])
  5. {
  6.  
  7. new
  8.     cmd[256],
  9.     idx;
  10.     cmd = strtok(cmdtext, idx);
  11. if(strcmp(cmd, "/goto", true) == 0) {
  12.   new
  13.        tmp[250],
  14.        Float:pos[3],
  15.        vw,
  16.        int;
  17.   tmp = strtok(cmdtext, idx);
  18.   if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff000000, "Devi Essere admin per usare questo Comando!");
  19.   if(!strlen(tmp)) return SendClientMessage(playerid, 0xff000000, "[USA] /goto ID");
  20.   int = GetPlayerInterior(strval(tmp));
  21.   vw = GetPlayerVirtualWorld(strval(tmp));
  22.   GetPlayerPos(strval(tmp), pos[0], pos[1], pos[2]);
  23.   SetPlayerInterior(playerid, int);
  24.   SetPlayerVirtualWorld(playerid, vw);
  25.   SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  26.   return true;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment