Jump to content
  • 0

pomoc padání hráčů z motorky/kola


-other-Mizi_CZ

Dotaz

2 odpovědí na tuto otázku

Recommended Posts

  • 0

Nahodou vim

 

#define Driver 0
#define Passanger 2

new InCar[MAX_PLAYERS];
new WhatCar[MAX_PLAYERS];

 

public OnPlayerExitVehicle(playerid, vehicleid)

{

InCar[playerid] = 0;

return 1;

}

 

public OnPlayerStateChange(playerid, newstate, oldstate)

{

if(oldstate == PLAYER_STATE_DRIVER)

{

if(newstate == PLAYER_STATE_ONFOOT)

{

if(InCar[playerid] == 1)

{

PutPlayerInVehicle(playerid, WhatCar[playerid], Driver);

}

}

}

if(oldstate == PLAYER_STATE_PASSENGER)

{

if(newstate == PLAYER_STATE_ONFOOT)

{

if(InCar[playerid] == 1)

{

PutPlayerInVehicle(playerid, WhatCar[playerid], Passanger);

}

}

}

if(oldstate == PLAYER_STATE_ONFOOT)

{

if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)

{

InCar[playerid] = 1;

WhatCar[playerid] = GetPlayerVehicleID(playerid);

}

}

return 1;

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...