Problem : Enter the car at death
#1

I want after death, enter a car next door will be disabled.
Please ask the Pro help .
Reply
#2

Not sure what you're saying.

Do you want cars to be locked for a player after they die?
Reply
#3

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Not sure what you're saying.

Do you want cars to be locked for a player after they die?
Yup , I want cars to be locked for a player after die.
Reply
#4

help me , Pls
Reply
#5

Will lock all cars for player if he died in a car

PHP код:

public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
         for(new 
0MAX_VEHICLESi++)
         {
             
SetVehicleParamsForPlayer(iplayerid01);
         }
     }
     return 
1;

or lock only the car player died in

PHP код:
public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
          
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), playerid01);
     }
     return 
1;

Reply
#6

Quote:
Originally Posted by Whatname
Посмотреть сообщение
Will lock all cars for player if he died in a car

PHP код:

public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
         for(new 
0MAX_VEHICLESi++)
         {
             
SetVehicleParamsForPlayer(iplayerid01);
         }
     }
     return 
1;

or lock only the car player died in

PHP код:
public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
          
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), playerid01);
     }
     return 
1;

It is normal, when death is still enter the car next door.
Is there any other solution?
Reply
#7

Quote:
Originally Posted by Whatname
Посмотреть сообщение
Will lock all cars for player if he died in a car

PHP код:

public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
         for(new 
0MAX_VEHICLESi++)
         {
             
SetVehicleParamsForPlayer(iplayerid01);
         }
     }
     return 
1;

or lock only the car player died in

PHP код:
public OnPlayerDeath(playerid)
{
     if(
IsPlayerInAnyVehicle(playerid))
     {
          
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), playerid01);
     }
     return 
1;

This may not work to be honest as players get removed from vehicles upon death, the best method would be to create a variable of the last vehicle ID then OnPlayerDeath, use that variable to set params.
Reply
#8

I think he is trying to say that he does not want players to enter the car next to them after dying. But this is not possible by default, unless you are using some roleplay script which forces player into 'injured' mode and forces them an animation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)