[HELP] PlayerIntoVehicle
#2


pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsPlayerInVehicle(playerid, 462))
    {
        if(GetPlayerState(playerid) == 2)//checks if player entered as driver
        {
            if(GetPlayerMoney(playerid) >= 25) //25 = the money u want the car to cost.
            {
                GivePlayerMoney(playerid,-25);
                SendClientMessage(playerid,YOUR_COLOR,"You just bought this car.");
            }
            else
            SendClientMessage(playerid,YOUR_COLOR,"You don't have enought money for this car.");
            RemovePlayerFromVehicle(playerid);
        }
        else
        SendClientMessage(playerid,YOUR_COLOR,"You need to enter as driver to buy this car."); //change YOUR_COLOR to the colors you have got and that you want to use
        RemovePlayerFromVehicle(playerid);
    }
}
Reply


Messages In This Thread
[HELP] PlayerIntoVehicle - by Smiths - 08.09.2009, 10:35
Re: [HELP] PlayerIntoVehicle - by saiberfun - 08.09.2009, 10:47
Re: [HELP] PlayerIntoVehicle - by Smiths - 08.09.2009, 11:01
Re: [HELP] PlayerIntoVehicle - by saiberfun - 08.09.2009, 11:05
Re: [HELP] PlayerIntoVehicle - by Zeex - 08.09.2009, 11:57
Re: [HELP] PlayerIntoVehicle - by saiberfun - 08.09.2009, 12:41
Re: [HELP] PlayerIntoVehicle - by Correlli - 08.09.2009, 13:34
Re: [HELP] PlayerIntoVehicle - by saiberfun - 08.09.2009, 13:44
Re: [HELP] PlayerIntoVehicle - by Coicatak - 08.09.2009, 15:14
Re: [HELP] PlayerIntoVehicle - by saiberfun - 08.09.2009, 15:24
Re: [HELP] PlayerIntoVehicle - by Coicatak - 08.09.2009, 18:36
Re: [HELP] PlayerIntoVehicle - by Smiths - 08.09.2009, 20:50
Re: [HELP] PlayerIntoVehicle - by Coicatak - 09.09.2009, 12:02

Forum Jump:


Users browsing this thread: 1 Guest(s)