22.11.2009, 20:23
Okay Iґll show you how to do this.
This is from my own gamemode, working fine:
This is from my own gamemode, working fine:
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(vehicleid) == 495) // CHANGE THIS to the vehicle ID of the cop car
{
if(cop[playerid] == 1) // CHANGE THIS to your define of cop
{
SendClientMessage(playerid,NICESKY,"Welcome to your car, officer!");
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,RED,"This car is for law enforcers only.");
}
}
}

