01.01.2013, 10:30
I tried to create a feature for VIP's where they can switch between their two vehicles, it shows the dialog and i couldnt make the response of the dialog veh is vehicle no 1 and vveh is vehicle number 2.Suppose i have a sultan and bullet and i am at san fierro with my sultan and i want to get my bullet at my place and respawn the sultan so how do it do it.Codes are given below.They dont work however compiles perfectly.
pawn Код:
else if(dialogid == 30)
{
if(response)
{
new carid, Veh, VVeh;
if(!PlayerInfo[playerid][VVeh]) return SendClientMessage(playerid, COLOR_GREY, "You only have one car, cant switch to others unless you own two cars.");
if(carid == Veh)
{
new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetVehiclePos(pVeh, pos[0], pos[1], pos[2]);
LinkVehicleToInterior(veh, GetPlayerInterior(playerid));
}
else if(carid == VVeh)
{
new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetVehiclePos(pVVeh, pos[0], pos[1], pos[2]);
LinkVehicleToInterior(veh, GetPlayerInterior(playerid));
}
}
}