Vehicle problems
#4

Quote:
Originally Posted by DIRTYBYT3
Посмотреть сообщение
Check OnPlayerStateChange
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
SetPlayerArmedWeapon(playerid,0);
}
if(newstate == PLAYER_STATE_PASSENGER)
{
if(newstate == PLAYER_STATE_PASSENGER)
{
new gun,tmp;
GetPlayerWeaponData(playerid,4,gun,tmp);
#pragma unused tmp
if(gun)SetPlayerArmedWeapon(playerid,gun);
else SetPlayerArmedWeapon(playerid,0);
}
}
if(newstate == PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
// if(!engine) SendClientMessage(playerid, COLOR_WHITE, "You can start or stop the vehicle's engine using {FF6347}/engine{FFFFFF}.");
if(!engine) GameTextForPlayer(playerid, "~w~/engine to turn on/off the vehicle engine.", 3500, 3);
//if(!PlayerInfo[playerid][pCarLic]) SendClientMessage(playerid, COLOR_LIGHTRED, " You don't have a drivers license, beware of cops.");
//if(IsATowTruck(vehicleid)) SendClientMessage(playerid, COLOR_WHITE, "You can tow a vehicle using {FF6347}/tow{FFFFFF}.");
}
return 1;
}
Reply


Messages In This Thread
Vehicle problems - by salev13 - 01.12.2018, 12:47
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:49
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:52
Re: Vehicle problems - by salev13 - 01.12.2018, 13:55
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 13:56
Re: Vehicle problems - by salev13 - 01.12.2018, 14:00
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:04
Re: Vehicle problems - by salev13 - 01.12.2018, 14:17
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:21
Re: Vehicle problems - by salev13 - 01.12.2018, 14:22
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 14:30
Re: Vehicle problems - by salev13 - 01.12.2018, 14:51
Re: Vehicle problems - by Tenka - 01.12.2018, 15:04
Re: Vehicle problems - by salev13 - 01.12.2018, 15:17
Re: Vehicle problems - by DIRTYBYT3 - 01.12.2018, 16:09

Forum Jump:


Users browsing this thread: 2 Guest(s)