Need help - Priv car
#2

That will call the function immediatly when a player is in a radius of a vehicle and trying to enter it. (presses enter or F)
I recommend a usage of OnPlayerStateChange:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new pName[24]; GetPlayerName(playerid,pName,24);
        if( (!strcmp(pName,"NuckFuts")) && (GetPlayerVehicleID(playerid) == NuckFuts))
        {
             //....
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,-1,"This car is payed and reserved for NuckFuts!");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Need help - Priv car - by Twix[KDZ] - 26.01.2012, 16:26
Re: Need help - Priv car - by [XST]O_x - 26.01.2012, 16:52

Forum Jump:


Users browsing this thread: 1 Guest(s)