07.02.2013, 06:28
Ok I have been up all night and my brain is frazzled..
I'm using 0.3x and on my server I can exit my vehicle in the mod shop, which then makes the menu un usable, which then means i am stuck in the mod shop and for some reason i can't even get into my car again, how can i stop the player being able to leave the vehicle whilst he/she is in the mod shop?
Here is my code for the entering/exiting vehicle on the secondary attack
I know this is simple as hell but I am so tired and just want it fixed before I go to sleep lol! Spent all night scripting and now this little problem is really annoying me haha!
Here is also my OnModShop code..
This is probably the lamest question I have had to ask on the forums but please allow me some credit for being up over 40+ hours lol..
Any help is muchly appreciated!
I'm using 0.3x and on my server I can exit my vehicle in the mod shop, which then makes the menu un usable, which then means i am stuck in the mod shop and for some reason i can't even get into my car again, how can i stop the player being able to leave the vehicle whilst he/she is in the mod shop?
Here is my code for the entering/exiting vehicle on the secondary attack
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
RemoveDriverFromVehicle(playerid);
if(engine[GetPlayerVehicleID(playerid)] == 0)
{
RemoveDriverFromVehicle(playerid);
if(PlayerInfo[playerid][pCarlic] == 0)
{
SetPlayerDrunkLevel (playerid, 0);
}
}
}
Here is also my OnModShop code..
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
new vehicle = GetPlayerVehicleID(playerid);
if(InModShop[playerid] == 1)
{
SetVehiclePos(vehicle, modx[playerid], mody[playerid], modz[playerid]);
SetPlayerPos(playerid, modx[playerid], mody[playerid], modz[playerid]);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Код:
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
new vehicle = GetPlayerVehicleID(playerid);
if(enterexit == 1)
{
GetVehiclePos(vehicle, modx[playerid], mody[playerid], modz[playerid]);
InModShop[playerid] = 1;
}
if(enterexit == 0)
{
SetVehiclePos(vehicle, modx[playerid], mody[playerid], modz[playerid]);
InModShop[playerid] = 0;
}
return 1;
}
Any help is muchly appreciated!




