Advertisement
Guest User

Pickup.pwn

a guest
Nov 20th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.02 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4.  
  5. #define FILTERSCRIPT
  6.  
  7. public OnFilterScriptInit() {print("Sistema by Marllun");return 1;}
  8.  
  9. CMD:icone(playerid, params[])//Comando
  10. {
  11.   static tipo,estilo,numero,msg[256],nomepickup[256], Float:x,world=-1, Float:y, Float:z; //Variáveis
  12.   GetPlayerPos(playerid, x, y, z);//Getar as coordenadas do player
  13.   new File:f3 = fopen ( "Icones.txt" , io_append  );//Criar e escrever no arquvivo
  14.   if (sscanf(params, "s[256]ddd", nomepickup,tipo,estilo,world)) return SendClientMessage(playerid, 0xFF0000FF, "| ERRO | /Icone [Nome] [ID] [Modelo] [VirtualWorld]"); //sscanf irá retorar caso ele não digite os 4 parametros do comando "[ID] [Modelo]"
  15.   format(msg,256, "new %s;\r\n\r\n\r\n %s = CreatePickup(%d,%d,%f,%f,%f,%d);//%d\r\n",nomepickup,nomepickup,tipo,estilo,x,y,z,world,numero);//Format para getar os valores no arquivo
  16.   fwrite(f3,msg), numero++;//setar o código acima no arquivo
  17.   fclose(f3);//Fechar
  18.   CreatePickup(tipo,estilo,x,y,z,0);//criar o pickup
  19.   return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement