05.01.2011, 22:22
I have two problems... After i have typed "/caroptions" then i die after the dialog comes to my screen =/
and how can i change "Larsey123" to inputtext
and how can i change "Larsey123" to inputtext
pawn Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/caroptions", true))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You must be in a vehicle.");
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Car Options", "License Plate", "Select", "Cancel");
return 1;
}
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 0) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Linence Plate", "Enter your license nuber (MAX: 32 characters)", "Update", "Cancel");
}
}
else if(dialogid == 2)
{
if(response)
{
for(new v = 0; v < MAX_PLAYERS; v ++)
{
SetVehicleNumberPlate(v, "Larey123");
SetVehicleToRespawn(v);
}
return 1;
}
}
return 0;
}