16.07.2015, 13:10
I'll give you an exemple, and you do the rest.
So, you have to define your cars at the top :
Then :
Under :
So, you have to define your cars at the top :
PHP код:
new CivilCar[2];
PHP код:
CivilCar[0] = AddStaticVehicle(560,1083.4089,-1755.0792,13.0921,271.8628,9,39); // civillll
CivilCar[1] = AddStaticVehicle(589,1098.1686,-1755.0533,13.0149,88.9525,31,31); // civillll
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == CivilCar[0] || GetPlayerVehicleID(playerid) == CivilCar[1])
{
if(gTeam[playerid] != CIVILIAN)
{
SendClientMessage(playerid,COLOR_RED,"Only civilians can use these vehicles.");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid,-1,"[[_Civilian Vehicle_]]");
SendClientMessage(playerid,CIVILIAN_COLOUR,"Welcome to your Civilian vehicle.");
return 1;
}
}