Help ! (+REP)
#8

This should get you started.
Try searching for these the next time.

PHP код:
#define MAX_GAS_PUMPS 5
enum gaspumpData {
    
Float:xPos,
    
Float:yPos,
    
Float:zPos
}
new 
GasPumpLoc[MAX_GAS_PUMPS][gaspumpData] = {
    
/*
        Edit below with the coords of your gas pumps
    */
    
{XYZ},
    {
XYZ},
    {
XYZ},
    {
XYZ},
    {
XYZ}
};
CMD:repair(playeridparams[])
{
    if(!
IsPlayerNearAGasPump(playerid))
        return 
SendClientMessage(playerid, -1"No where near a place you can repair your vehicle.");
    if(!
IsPlayerInAnyVehicle(playerid))
        return 
SendClientMessage(playerid, -1"You must be inside a vehicle to use this command.");
        
    
// Repair, or whatever you have to do..
    
return 1;
}
IsPlayerNearAGasPump(playerid)
{
    for(new 
0sizeof(GasPumpLoc); i++)
    {
        if(
IsPlayerInRangeOfPoint(playerid4.0GasPumpLoc[i][xPos], GasPumpLoc[i][yPos], GasPumpLoc[i][zPos])) return 1;
    }
    return 
0;

Reply


Messages In This Thread
Help ! (+REP) - by Shaheen - 09.03.2016, 19:31
Re: Help ! (+REP) - by Deny1 - 09.03.2016, 19:36
Re: Help ! (+REP) - by CodeStyle175 - 09.03.2016, 19:40
Re: Help ! (+REP) - by Shaheen - 09.03.2016, 19:45
Re: Help ! (+REP) - by CodeStyle175 - 09.03.2016, 19:47
Re: Help ! (+REP) - by saffierr - 09.03.2016, 19:49
Re: Help ! (+REP) - by Shaheen - 10.03.2016, 08:37
Re: Help ! (+REP) - by itsCody - 10.03.2016, 08:55
Re: Help ! (+REP) - by Shaheen - 12.03.2016, 17:22
Re: Help ! (+REP) - by Shaheen - 12.03.2016, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)