Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #define FILTERSCRIPT
- public OnFilterScriptInit() {print("Sistema by Marllun");return 1;}
- CMD:icone(playerid, params[])//Comando
- {
- static tipo,estilo,numero,msg[256],nomepickup[256], Float:x,world=-1, Float:y, Float:z; //Variáveis
- GetPlayerPos(playerid, x, y, z);//Getar as coordenadas do player
- new File:f3 = fopen ( "Icones.txt" , io_append );//Criar e escrever no arquvivo
- 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]"
- 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
- fwrite(f3,msg), numero++;//setar o código acima no arquivo
- fclose(f3);//Fechar
- CreatePickup(tipo,estilo,x,y,z,0);//criar o pickup
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement