Car Problem
#2

Okay Iґll show you how to do this.

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.");
    }
    }
}
Reply


Messages In This Thread
Car Problem - by mbk - 22.11.2009, 19:10
Re: Car Problem - by Striker_Moe - 22.11.2009, 20:23

Forum Jump:


Users browsing this thread: 1 Guest(s)