Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

It's me again..

$
0
0
PHP Code:

CMD:repairmycar(playeridparams[])
{
    if(!
IsPlayerInAnyVehicle(playerid))
        return 
SendErrorMessage(playerid"You are not in a vehicle!");

    if(
GetPlayerState(playerid) != 2)
        return 
SendErrorMessage(playerid"You are not in the driver seat!");

    if(!
IsPlayerInRangeOfPoint(playerid15.0, -2417.77442303.79791.8781))
        return 
SendErrorMessage(playerid"You should be in range of the point to /repairmycar !");

    
SendClientMessage(playeridCOLOR_WHITE"Your vehicle will be ready in a half of hour (30 seconds).");

    
RemovePlayerFromVehicle(playerid);
    
SetTimerEx("RepairMyCar",30000,false,"d",GetPlayerVehicleID(playerid));
    
GivePlayerMoney(playerid, - 150);
    return 
1;
}
forward RepairMyCar(pvehicleid);
public 
RepairMyCar(pvehicleid)
{
    
RepairVehicle(pvehicleid);
    return 
1;


I am trying to make so if you leave the point
PHP Code:

if(!IsPlayerInRangeOfPoint(playerid15.0, -2417.77442303.79791.8781)) 

the repairing process stops.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>