15.03.2014, 15:42
Hello everyone !
I've tried to put some NRG's for DMV system, but something goes wrong.. I've tried to make something to remove player from vehicle if he/she dosen't take the license but doesn't work..
Cars:
And here it's the state change and EnterVeh
oh... and when I enter in a vehicle it send me that RED msg, from On foot to Driver.
I've tried to put some NRG's for DMV system, but something goes wrong.. I've tried to make something to remove player from vehicle if he/she dosen't take the license but doesn't work..
Cars:
pawn Код:
new dmvCar[6];
public OnGameModeInit()
{
dmvCar[0] = AddStaticVehicle(522,1237.3453,-1811.9757,13.0060,270.1060,0,0); // nrg - st
dmvCar[1] = AddStaticVehicle(522,1237.3505,-1814.8752,13.0018,270.1060,0,0); //
dmvCar[2] = AddStaticVehicle(522,1237.3563,-1817.9918,12.9972,270.1059,0,0); //
dmvCar[3] = AddStaticVehicle(522,1237.3616,-1820.9006,12.9930,270.1058,0,0); //
dmvCar[4] = AddStaticVehicle(522,1237.3665,-1823.7605,12.9935,270.1081,0,0); // nrg - end
return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid >= dmvCar[0] && vehicleid <= dmvCar[5])
{
SendClientMessage(playerid,COLOR_AQUA,"You don't have the keys for this car !");
RemovePlayerFromVehicle(playerid);
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
{
new vehicleid = GetPlayerVehicleID(playerid);
SendClientMessage(playerid,COLOR_RED,"State changed from ON FOOT to DRIVER !");
}
return 1;
}
Sorry for some gramatical mistakes