27.08.2012, 13:37
try changing this:
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
PutPlayerInVehicle(playerid, CreateVehicle(520, X, Y, Z+2, VAngle, -1, -1, -1), 0);
}
to this
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
PutPlayerInVehicle(playerid, CreateVehicle(520, X, Y, Z+2, VAngle, -1, -1, -1), 0);
return 1;
} This way, it may not conflict with the else. I think this should be the problem. The script goes to the if, but it doesn't stop, and then it goes to the else also.
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
PutPlayerInVehicle(playerid, CreateVehicle(520, X, Y, Z+2, VAngle, -1, -1, -1), 0);
}
to this
if(IsPlayerInAnyVehicle(playerid))
{
DestroyVehicle(GetPlayerVehicleID(playerid));
PutPlayerInVehicle(playerid, CreateVehicle(520, X, Y, Z+2, VAngle, -1, -1, -1), 0);
return 1;
} This way, it may not conflict with the else. I think this should be the problem. The script goes to the if, but it doesn't stop, and then it goes to the else also.