Rent Problem
#1

how can i make so if player gets off off a rented vehicle.. to appear a 20 second cowntown..if plaayer isnt on vehicle..to respawn vehicle..plz help
Reply
#2

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(vehicle == X || vehicle == X ...) // the rented vehicle ID's
    {
        if(CheckIfThePlayerIsRentingACar == 1)
        {
            SetTimerEx("RentRespawn", 20000, false, "i", playerid); // set the timer for the function
            SendClientMessage(playerid, 0xFFFFFFFF, "20 seconds to get back in the vehicle or you'll lose its rent.");
        }
    }
    return 1;
}

forward RentRespawn(playerid);
public RentRespawn(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) // if he's not in a vehicle
    {
        SetVehicleToRespawn(SetRentedVehicleToRespawn);
        VariableForPlayerRentingVehicle = 0;
    }
    else
    {
        new v = GetPlayerVehicleID(playerid);
        if(v == CheckIfTheVehicleIsTheOneThatThePlayerRents) return 1; // stop the function here
        SetVehicleToRespawn(SetRentedVehicleToRespawn); // if it's not his vehicle, respawn it
        VariableForPlayerRentingVehicle = 0; // and set the variable for the player renting a vehicle to 0
    }
    return 1;
}
Reply
#3

what can i put here??

new v = GetPlayerVehicleID(playerid);
if(v == CheckIfTheVehicleIsTheOneThatThePlayerRents) return 1;

PS:this good??

PHP код:
forward RentRespawn(playerid);
public 
RentRespawn(playerid)
{
    if(!
IsPlayerInAnyVehicle(playerid)) // if he's not in a vehicle
    
{
        
SetVehicleToRespawn(HireCar[playerid]);
        
HireCar[playerid] = 299;
    }
    else
    {
        new 
GetPlayerVehicleID(playerid);
        if(
== HireCar[playerid]) return 1// stop the function here
        
SetVehicleToRespawn(HireCar[playerid]); // if it's not his vehicle, respawn it
        
HireCar[playerid] = 299// and set the variable for the player renting a vehicle to 0
    
}
    return 
1;

PHP код:
if(IsARentCar(vehicleid) || IsABarca(vehicleid) || IsAMotor(vehicleid)) // the rented vehicle ID's
                    
{
                        if(
HireCar[playerid] != 299)
                        {
                            
SetTimerEx("RentRespawn"20000false"i"playerid); // set the timer for the function
                            
SendClientMessage(playerid0xFFFFFFFF"20 seconds to get back in the vehicle or you'll lose its rent.");
                        }
                    } 
Reply
#4

is it good?i did not spam.. look at time!!pls answer
Reply
#5

how can i make it so because he types /up or /slap .. or he falls of motocycle..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)