How to make a car rentable
#1

in raven's roleplay how to make a car rentable. i posted in raven's roleplay topic but no one replied
Reply
#2

What do you mean, in raven's RP cars ARE already rentable
Reply
#3

Are you wanting to make another/more rental cars?
Reply
#4

Quote:
Originally Posted by Mehtab
Посмотреть сообщение
in raven's roleplay how to make a car rentable. i posted in raven's roleplay topic but no one replied
Quote:
Originally Posted by Mehtab
Посмотреть сообщение
sorry for double posting. please help me fast
Wait 12 hours before bumping a topic NOT 12 MINUTES.

And maybe you should read the raven's rp topic. there is A LOT of info there.
Reply
#5

<_<
Quote:

b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.



The message you have entered is too short. Please lengthen your message to at least 8 characters.
Reply
#6

how do i make more rentable cars and bikes in raven's roleplay
Reply
#7

pawn Код:
new RentCar[10]; //10 rentable cars

public OnGameModeInit()
{
RentCar[0] = CreateVehicle(.......);
RentCar[1] = CreateVehicle(.......);
RentCar[2] = CreateVehicle(.......);
RentCar[3] = CreateVehicle(.......);
RentCar[4] = CreateVehicle(.......);
RentCar[5] = CreateVehicle(.......);
RentCar[6] = CreateVehicle(.......);
RentCar[7] = CreateVehicle(.......);
RentCar[8] = CreateVehicle(.......);
RentCar[9] = CreateVehicle(.......);
}

public OnPlayerStateChange(playerid,newstate,oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
       
                     for(new i=0; i<sizeof(RentCar); i++)
             {
                     if (vehicleid == RentCar[i]) {
                     TogglePlayerControllable(playerid, 0);
                     SendClientMessage(playerid, COLOR_COLOR,"Would you like to rent this vehicle? Type /rentveh or /exit");
                     }
                }



return 1;
}
Then just make two cmds; /exit to RemovePlayerFromVehicle(playerid); and /rentveh to TogglePlayerControllable(playerid, 1); if the player is in RentCar



EDIT:

Here

pawn Код:
if(strcmp(cmd,"/exit",true)==0)
        {
                     for(new i=0; i<sizeof(RentCar); i++)
             {
                     if (GetPlayerVehicleID(playerid) == RentCar[i]) {
                     RemovePlayerFromVehicle(playerid);
                     }
                     }
        return 1;
        }

        if(strcmp(cmd,"/rentveh",true)==0)
        {
                     for(new i=0; i<sizeof(RentCar); i++)
             {
                     if (GetPlayerVehicleID(playerid) == RentCar[i]) {
                     TogglePlayerControllable(playerid, 1);
                     GivePlayerMoney(playerid, -5000);
                     SendClientMessage(playerid, COLOR_COLOR,"You have rent this vehicle");
                     }
                     }
        return 1;
        }
Sorry for bad indentation, I wrote them quickly
Reply
#8

thanks buddy
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)