if ( strcmp( cmdtext, "/mudarplaca", true) == 0)
{
ShowPlayerDialog(playerid, 10101, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite sua Placa:\n\nMaximo de 8 Caracteres", "Mudar", "Cancelar");
return 1;
}
return 1;
}
if(dialogid == 10101)
{
new string[128], Float:X, Float:Y, Float:Z, Float:angle;
if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
else
{
format(string, sizeof(string), "Vocк mudou o texto de sua placa para '%s'.", inputtext);
SendClientMessage(playerid, 0x33CCFFAA, string);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, angle);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);
}
}
return 1;
}
if (strcmp("/comprar", cmdtext, true, 10) == 0)
{
if(SBizzInfo[9][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~fim de estoque", 5000, 1);
return 1;
}
if(IsAtLoja(playerid))
{
new listitems[] = "R$500 - Celular\nR$500 - Capacete\nR$5000 - Agenda\nR$500 - Dado\nR$5000 - Chaves\nR$10000 - Trava de Veнculo\nR$5000 - Velocimetro\nR$50 - Preservativo\nR$250 - IPod\nR$10 - Frango\nR$10 - Hamburguer\nR$10 - Pizza Congelada\nR$10 - Corda\nR$50 - Maзo de Cigarro\n";
ShowPlayerDialog(playerid,6271,DIALOG_STYLE_LIST,"Lista de Produtos:\nQual deseja comprar?\n",listitems,"Comprar","Sair");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб em um bar");
return 1;
}
}
#include <a_samp>
public OnPlayerCommandText( playerid, cmdtext[])
{
if ( strcmp( cmdtext, "/mudarplaca", true) == 0)
{
ShowPlayerDialog(playerid, 10101, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite sua Placa:\n\nMaximo de 8 Caracteres", "Mudar", "Cancelar");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 10101)
{
if(!response)
{
new string[128], Float:X, Float:Y, Float:Z, Float:angle;
if(strlen(inputtext) < 1 || strlen(inputtext) > 8) return SendClientMessage(playerid, 0xAFAFAFAA, "Texto Invalido.");
format(string, sizeof(string), "Vocк mudou o texto de sua placa para '%s'.", inputtext);
SendClientMessage(playerid, 0x33CCFFAA, string);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, angle);
SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
GetPlayerPos(playerid, X, Y, Z);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+2);
}
}
return 1;
}
Coloca no GM tao simples mem. aki oh
No OnPlayerCommandText pawn Код:
pawn Код:
Manda o teu /comprar na 24-7 aew q faco para vc |
if ( strcmp( cmdtext, "/mudarplaca", true) == 0)
{
ShowPlayerDialog(playerid, 10101, DIALOG_STYLE_INPUT, "Sistema de Placa", "Digite sua Placa:\n\nMaximo de 8 Caracteres", "Mudar", "Cancelar");
return 1;
}