Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Checkpoint Creator v1.0
- by AleeFerreira
- * Como utilizar:
- - Vá no local que você deseja adicionar o checkpoint
- - digite /criarcheckpoint e siga os dialogs
- - você também pode adicionar um 3DText em cima dele após criar o check *-*
- OBS: O script foi feito para as pessoas que usam cpstream,
- caso você não use em seu gamemode, talvez esse creator não irá ajudá-lo muito!
- Na próxima versão estarei adicionando uma opção para quem usa cpstream ou SetPlayerCheckpoint!
- */
- #include <a_samp>
- #include <zcmd>
- #include <cpstream>
- new Float:PosX;
- new Float:PosY;
- new Float:PosZ;
- new textoinput[230];
- new File: Arquivo;
- new MSG[230];
- public OnFilterScriptInit()
- {
- print("\n***************************************");
- print(" Checkpoint Creator by AleeFerreira");
- print(" Carregando.. ");
- print("***************************************\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n***************************************");
- print(" Checkpoint Creator by AleeFerreira");
- print(" Descarregando.. ");
- print("***************************************\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,0x004CB1AA,"Digite /criarcheckpoint para criar um checkpoint!");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 9853)
- {
- if(response)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- CPS_AddCheckpoint(PosX,PosY,PosZ, 2.0, 40);
- SendClientMessage(playerid,0x004CB1AA,"Checkpoint criado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"CPS_AddCheckpoint(%f,%f,%f, 1.0, 40);\r\n",PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- ShowPlayerDialog(playerid,9854,DIALOG_STYLE_MSGBOX,"Checkpoint Creator by AleeFerreira","Você deseja adicionar um 3Dtext no checkpoint?","Sim","Nao");
- }
- else
- {
- }
- }
- if(dialogid == 9854)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,9974,DIALOG_STYLE_INPUT,"Checkpoint Creator by AleeFerreira","Digite o texto a ser mostrado:","Continuar","Sair");
- }
- else
- {
- }
- }
- if(dialogid == 9974)
- {
- if(response)
- {
- strmid( textoinput, ( inputtext ), 0, strlen( inputtext ), 255 );
- ShowPlayerDialog(playerid,9645,DIALOG_STYLE_LIST,"Checkpoint Creator by AleeFerreira","{004CB1}COR AZUL\n{DB4CC0}COR ROSA\n{00020F}COR PRETA\n{FFFFFF}COR BRANCA\n{00AC00}COR VERDE\n{F6F62D}COR AMARELO","Selecionar","Sair");
- }
- else
- {
- }
- }
- if(dialogid == 9645)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0x004CB1AA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0x004CB1AA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 1)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0xDB4CC0AA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0xDB4CC0AA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 2)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0x00020FAA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0x00020FAA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 3)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0xFFFFFFAA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0xFFFFFFAA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 4)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0x00AC00AA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0x00AC00AA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 5)
- {
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- Create3DTextLabel(textoinput, 0xF6F62DAA, PosX, PosY, PosZ, 10, 0, -1);
- SendClientMessage(playerid,0x004CB1AA,"3DText adicionado com sucesso!");
- Arquivo = fopen("/Checkpoints.txt",io_append);
- format(MSG,230,"Create3DTextLabel(\"%s\", 0xF6F62DAA, %f, %f, %f, 10, 0, -1);\r\n",textoinput,PosX,PosY,PosZ);
- fwrite(Arquivo, MSG);
- fclose(Arquivo);
- }
- if(listitem == 6)
- {
- }
- }
- else
- {
- }
- }
- return 1;
- }
- //****************************** COMMANDS :) ******************************
- CMD:criarcheckpoint(playerid)
- {
- ShowPlayerDialog(playerid,9853,DIALOG_STYLE_MSGBOX,"Checkpoint Creator by AleeFerreira","Você deseja criar um checkpoint aqui?","Sim","Nao");
- return true;
- }
- CMD:creditoscreator(playerid)
- {
- ShowPlayerDialog(playerid,9322,DIALOG_STYLE_MSGBOX,"Checkpoint Creator Créditos","AleeFerreira - Criador\nZeeX - Zcmd\n[MPA]matraka_IDG - cpstream\nEquipe SA-MP For All","OK","Sair");
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement