SHARE
TWEET

[FS] FilterScript Sistema de Teleportes

Chip7 Aug 23rd, 2012 387 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*VISITE NOSSO SITE: http://www.sampknd.com/
  2.   VISITE NOSSO FACEBOOK: http://www.facebook.com/SampKnd
  3.   SAMP KND MELHOR BLOG DE SAMP DO BRASIL
  4. */
  5.  
  6. #include <a_samp>
  7. #include <zcmd>
  8. #include <sscanf2>
  9.  
  10. new TPOnOff[MAX_PLAYERS];
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.         print(" -- Sistema de Teleporte By: Panico -- ");
  15.         return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.         return 1;
  21. }
  22.  
  23. public OnPlayerConnect(playerid)
  24. {
  25.         TPOnOff[playerid] = 0;
  26.         return 1;
  27. }
  28.  
  29. public OnPlayerDisconnect(playerid, reason)
  30. {
  31.     TPOnOff[playerid] = 0;
  32.         return 1;
  33. }
  34. CMD:tpon(playerid, params[])
  35. {
  36.         TPOnOff[playerid] = 1;
  37.         SendClientMessage(playerid, 0x999999FF, "Vc {FF0000}Ativou{999999} o Teleporte!Agora Qualquer Player Pode Se Teleportar ate vc");
  38.         SendClientMessage(playerid, 0x999999FF, "Para desativar use: {FF0000}/tpoff");
  39.         return 1;
  40. }
  41. CMD:tpoff(playerid, params[])
  42. {
  43.         TPOnOff[playerid] = 0;
  44.         SendClientMessage(playerid, 0x999999FF, "Vc {FF0000}Desativou {999999}o Teleporte!Agora os Player nao Podem mais Se Teleportar ate vc");
  45.         SendClientMessage(playerid, 0x999999FF, "Para Ativar use: {FF0000}/tpon");
  46.         return 1;
  47. }
  48. CMD:tp(playerid, params[])
  49. {
  50.         new ID;
  51.         new String[250];
  52.         if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0x999999FF, "Use /tp [{FF0000}ID{999999}]");
  53.     if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0x999999FF, "ID invalido");
  54.     if(TPOnOff[ID] == 1)
  55.     {
  56.                 new Float:x, Float:y, Float:z;
  57.             GetPlayerPos(ID, x, y, z);
  58.                 SetPlayerPos(playerid, x, y, z);
  59.                 format(String, sizeof(String), "O Player {FF0000}%s {999999}veio até você!", nome(playerid));
  60.                 SendClientMessage(ID, 0x999999FF, String);
  61.                 format(String, sizeof(String), "Vc foi ate o Player {FF0000}%s", nome(ID));
  62.                 SendClientMessage(playerid, 0x999999FF, String);
  63.         }
  64.         else return SendClientMessage(ID, 0x999999FF, "O Player esta com o Teleporte {FF0000}Desativado");
  65.         return 1;
  66. }
  67. stock nome(playerid)
  68. {
  69.         new pnome[MAX_PLAYER_NAME];
  70.         GetPlayerName(playerid, pnome, 24);
  71.         return pnome;
  72. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top