Need Help
#1

Hello!
If a player enter a bike (not in a car) then the player should get a message
pawn Код:
SendClientMessage(playerid,red,"blablablabla
How to do that?
Reply
#2

GetVehicleModel
Reply
#3

ok ty
Reply
#4

pawn Код:
stock IsBike(vehicleid)
{
    switch(GetVehicleModel(vehicleid))
    {
        case 509, 481, 510, 462, 581, 522, 461, 521, 523, 463, 586, 468, 471: return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsBike(vehicleid))
    {
        SendClientMessage(playerid, COLOR_RED, "You cannot enter a bike!");
        return 0;
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)