Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------
- #include <a_samp>
- //------------------------------------------------
- #define scmd:%0(%1,%2) _%0(%1,%2); public _%0(%1,%2)//By [S]trong
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (3)
- //------------------------------------------------
- #define Vermelho 0xFF0000FF
- #define Vermelho_Claro 0xFF8080FF
- #define Azul_Claro 0x63C8E4FF
- #define Cinza 0x808080FF
- #define Verde 0x00FF00FF
- #define Azul 0x0000FFFF
- #define Amarelo 0x0000FFFF
- #define Rosa 0xFF00FFFF
- //------------------------------------------------
- #define Criacao 100
- #define Texto 200
- #define Draw 400
- #define VirtualW 500
- #define Pickup 600
- #define PickupID 700
- //------------------------------------------------
- new
- stryng[128],
- Text3D: PickupP[MAX_PLAYERS],
- Float: Pos[3],
- Color[MAX_PLAYERS],
- Textoz[MAX_PLAYERS][128],
- Float: DrawDistance[MAX_PLAYERS],
- VW[MAX_PLAYERS]
- ;
- //------------------------------------------------
- public OnFilterScriptInit()
- {
- print("\n\n**** Create3DPickup - Ligando....Ok\n");
- print("**** Create3DPickup - Carregando Comandos ....Ok\n");
- print("**** Create3DPickup - Carregado!!\n\n");
- return 1;
- }
- //------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, -1, "Este servidor usa o FS Criaçao de 3DTextLabel e Pickup In-Game");
- SendClientMessage(playerid, -1, "Criador: [R]ousenber[K] ou [KoS]Dylan");
- return true;
- }
- //------------------------------------------------
- public OnPlayerDisconnect(playerid, reason)
- {
- return true;
- }
- //------------------------------------------------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- //------------------------------------------------
- public OnPlayerCommandText(playerid,cmdtext[])//By [S]trong
- {
- static i;
- new
- cmdcall[26];
- i = strfind(cmdtext," ");
- return i == -1 ? (cmdtext[0] = 95,CallLocalFunction(cmdtext,"ds",playerid,"\1")) : (strcat(cmdcall,cmdtext,i+1),cmdcall[0] = 95,CallLocalFunction(cmdcall,"ds",playerid,cmdtext[i+1]));
- }
- //------------------------------------------------
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case Criacao:
- {
- switch(listitem)
- {
- case 0:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Vermelho, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Vermelho;
- }
- case 1:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Vermelho_Claro, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Vermelho_Claro;
- }
- case 2:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Azul_Claro, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Azul_Claro;
- }
- case 3:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Cinza, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Cinza;
- }
- case 4:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Verde, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Verde;
- }
- case 5:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Azul, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Azul;
- }
- case 6:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Amarelo, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Amarelo;
- }
- case 7:
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel("", Rosa, Pos[0], Pos[1], Pos[2], 10.0, 0);
- ShowPlayerDialog(playerid, Texto, DIALOG_STYLE_INPUT, "{FF0000}> Digite o Texto de seu 3DLabel <","{FF0000}Digite seu Texto Abaixo:","Ok","Cancelar");
- Color[playerid] = Rosa;
- }
- }
- }
- case Texto:
- {
- if(response)
- {
- Update3DTextLabelText(PickupP[playerid], Color[playerid], inputtext);
- format(stryng, sizeof(stryng), "%s", inputtext);
- Textoz[playerid] = stryng;
- ShowPlayerDialog(playerid, Draw, DIALOG_STYLE_INPUT, "{FF0000}> Digite a 'Draw Distance' <","{FF0000}Digite o tanto que você deseja de distancia que esse texto pode ser visto:","Ok","Cancelar");
- }
- }
- case Draw:
- {
- if(response)
- {
- Delete3DTextLabel(PickupP[playerid]);
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- DrawDistance[playerid] = float(strval(inputtext));
- PickupP[playerid] = Create3DTextLabel(Textoz[playerid], Color[playerid], Pos[0], Pos[1], Pos[2], float(strval(inputtext)), 0);
- ShowPlayerDialog(playerid, VirtualW, DIALOG_STYLE_INPUT, "{FF0000}> Digite o 'Virtual World' <","{FF0000}Digite o ID do Virtual World abaixo:","Ok","Cancelar");
- }
- }
- case VirtualW:
- {
- if(response)
- {
- if(strval(inputtext) < 0 || strval(inputtext) > 100) return ShowPlayerDialog(playerid, VirtualW, DIALOG_STYLE_INPUT, "{FF0000}> Digite o 'Virtual World' <","{FF0000}Digite o ID do Virtual World abaixo:","Ok","Cancelar");
- Delete3DTextLabel(PickupP[playerid]);
- VW[playerid] = strval(inputtext);
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- PickupP[playerid] = Create3DTextLabel(Textoz[playerid], Color[playerid], Pos[0], Pos[1], Pos[2], DrawDistance[playerid], strval(inputtext));
- ShowPlayerDialog(playerid, Pickup, DIALOG_STYLE_LIST, "{FF0000}> Deseja criar um pickup tambem? <","{00FF00}Sim\n{FF0000}Não", "Continuar", "Fechar");
- }
- }
- case Pickup:
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, PickupID, DIALOG_STYLE_INPUT, "{FF0000}> Digite o ID do pickup <","{FF0000}Digite o ID abaixo:", "Ok", "Cancelar");
- }
- case 1:
- {
- GameTextForPlayer(playerid, "Criacao do ~r~Create3DTextLabel~w~ Finalizada!", 7000, 5);
- }
- }
- }
- case PickupID:
- {
- if(response)
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GameTextForPlayer(playerid, "Criacao do ~r~Create3DTextLabel~w~ e ~r~Pickup~w~ Finalizada!", 7000, 5);
- CreatePickup(strval(inputtext), 23, Pos[0], Pos[1], Pos[2], VW[playerid]);
- }
- }
- }
- return 0;
- }
- //------------------------------------------------
- scmd:criarlp(playerid, params[])
- {
- ShowPlayerDialog(playerid, Criacao, DIALOG_STYLE_LIST, "{FF0000}> Seleciona a cor de Seu 3DLabel <","{FF0000}Vermelho\n{FF8080}Vermelho Claro\n{63C8E4}Azul Claro\n{808080}Cinza\n{00FF00}Verde\n{0000FF}Azul\n{FFFF80}Amarelo\n{FF00FF}Rosa","Selecionar","Cancelar");
- return true;
- }
- //------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement