How to edit this
#3

Код:
Hook:paynspray_OnPlayerUpdate(playerid)
{
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
                new Float:vHealth;
                GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
                if(vHealth == 1000)
                {
                        SetVehicleHealth(GetPlayerVehicleID(playerid), 999);
                       
                new const Float:paynspray[][] = {
                {1025.05, -1024.23, 32.1}, // LS Temple
                {487.68, -1740.87, 11.13}, // LS Santa Maria
                        {-1420.73, 2583.37, 55.56}, // El Quebrados
                        {-1904.39, 284.97, 40.75}, // Wang Cars
                        {-2425.91, 1022.33, 50.10}, // Juniper Hill
                        {1975.60, 2162.16, 10.77}, // LV Redsands
                        {2065.38, -1831.51, 13.25}, // Idlewood
                        {-99.55, 1118.36, 19.44}, // Fort Carson
                        {721.07, -455.94, 16.04}, // Dillimore
                        {2393.74, 1493.01, 10.52} // LV Unused (Pyramid)
                };
                for(new i=0; i<sizeof(paynspray); i++)
                {
                    if(IsPlayerInRangeOfPoint(playerid, 10, paynspray[i][0], paynspray[i][1], paynspray[i][2]))
                                {
                                    if(GetPlayerCash(playerid) >= 2500)
                                    {
                                        CallRemoteFunction("OnVehicleRespray", "iiii", playerid, GetPlayerVehicleID(playerid), -1, -1);
                                        GivePlayerCash(playerid, -2500);
                                        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Thank you, the total today was 2,500.");   
                                    }
                                    else
                                    {
                                        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You dont not have the money for this");
                                        return 1;
                                    }
                                }
                        }
                }
        }
        return 1;
}
Reply


Messages In This Thread
How to edit this - by IndependentGaming - 11.02.2015, 15:37
Re: How to edit this - by IndependentGaming - 11.02.2015, 17:35
Re: How to edit this - by kevin1990 - 11.02.2015, 18:00
Re: How to edit this - by kevin1990 - 11.02.2015, 18:51
Re: How to edit this - by IndependentGaming - 11.02.2015, 19:06

Forum Jump:


Users browsing this thread: 1 Guest(s)