Problem
#1

hi , can someone tell me what could cause.. so if a player high jacks my car i want to lose job and vehicle to respawn .. and none of them work why??

PHP Code:
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
                        {
                            new 
veh GetPlayerVehicleID(playerid);
                            if(
PlayerInfo[playerid][pJob] == 20)
                            {
                                if(
IsAFarmerCar(vehi))
                                {
                                    
SendClientMessage(playeridCOLOR_RED"You exited the vehicle !");
                                    
SetVehicleToRespawn(veh);
                                    
printf("Testing");
                                  }
                            }
                        } 
Reply
#2

anyone ??
Reply
#3

Code:
if(IsAFarmerCar(vehi))
shouldn't it be veh instead of vehi ?

Code:
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT) 
                        { 
                            new veh = GetPlayerVehicleID(playerid);
also how can you get vehicle info if the player is on foot ?
Reply
#4

if he is in car and exits..
Reply
#5

That's why OnPlayerExitVehicle exists.
Reply
#6

but if I get car jacked??or player gets removed from vehicle??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)