pawn Код:
//no topo do gm:
new vvv[MAX_PLAYERS];
//nos comandos
if(!strcmp("/carro", cmdtext))
{
ShowPlayerDialog(playerid, IDDOMEUDIALOG, DIALOG_STYLE_INPUT, "ID do Carro", "Digite a Id do Caro que quer", "Ok", "Cancelar");
return 1;
}
//no ondialogresponse
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == IDDOMEUDIALOG)
{
if(response)
{
new Float:xx[4];
GetPlayerPos(playerid, xx[0],xx[1],xx[2]);
GetPlayerFacingAngle(playerid,xx[3]);
vvv[playerid] = CreateVehicle(strval(inputtext),xx[0],xx[1],xx[2],xx[3],-1,-1,500);
PutPlayerInVehicle(playerid,vvv[playerid],0);
return 1;
}
else
{
SendClientMessage(playerid, COR, "Vocк cancelou");
}
}
return 1;
}