20.04.2014, 16:49
Hi!
I have created a spawn car system(dialog) and made its response on 'OnDialogResponse'.
But now I have problem in putting the code of responses to other dialogs.
Spawn car system dialog response:
How do I add a response to /weapons dialog ?Don't know where to add it lol :P
I have created a spawn car system(dialog) and made its response on 'OnDialogResponse'.
But now I have problem in putting the code of responses to other dialogs.
Spawn car system dialog response:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 12)
{
if(response == 1)
{
if(listitem == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
if(listitem == 1)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
if(listitem == 2)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, a);
new vehicleid = CreateVehicle(451, x+3,y,z, a, -1, -1, -1);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
}
}
return 1;
}