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

Hey

$
0
0
I want to create a command that repairs your vehicle, but I have issues with the timer.

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(playerid6.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 one hour (1 minute).");

    
GivePlayerMoney(playerid, - 200);
        
    
RepairVehicle(GetPlayerVehicleID(playerid));  
    return 
1;


I need help with kicking the player out of the vehicle and make the vehicle respawn after 1 minute. Thanks in advance.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



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