SA-MP Forums Archive
Need Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help (/showthread.php?tid=245056)



Need Help - Ironboy - 29.03.2011

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?


Re: Need Help - [NRP]Blade - 29.03.2011

GetVehicleModel


Re: Need Help - Ironboy - 29.03.2011

ok ty


Re: Need Help - [L3th4l] - 29.03.2011

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;
}