SA-MP Forums Archive
[FilterScript] PPC_Balance - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] PPC_Balance (/showthread.php?tid=400356)



PPC_Balance - Don_Speed - 18.12.2012

PPC_Balance
Hello DonSpeed come here and bringing a complement to PPC_Trucking, a game mode widely used.

Let's do a brief explanation ...

pawn Code:
#define MAX_BALACE    2
You will put the amount of which will wear balaces

pawn Code:
new Float:Balanca[MAX_BALACE][3]={
{00.00,00.00,00.00},
{00.00,00.00,00.00}
};
Put the coordinates can be added more, to add the following manner cordenada X, Y, Z

pawn Code:
/*
                              PPC_Balance

              Method of Use:
                  #include <PPC_Balance.pwn> On top of GM
                  SetTimer("DonSpeed", 300, true); in OnGameModeInit
                  DCheck[playerid] = true; in OnPlayerConnect



               Credits:     DonSpeed

         Explanation:

                 * Pass on the scales and he has checked quaso oveload and fined.
}*/


#include             a_samp

#define MAX_BALACE    2

#define LARANJA   0xFF6600AA

new Float:Balanca[MAX_BALACE][3]={
{00.00,00.00,00.00}, // coordinates for the balance
{00.00,00.00,00.00}//More can be added, the amount that you want
};

new bool:DCheck[MAX_PLAYERS];

stock DonSpeed(playerid)
{
     if(!IsPlayerInAnyVehicle(playerid))return 1;
     for(new i = 0; i < sizeof(MAX_BALACE); i++)
     {
         if(!IsPlayerInRangeOfPoint(playerid, 3.0,Balanca[i][0], Balanca[i][1], Balanca[i][2]))return 1;
         if(APlayerData[playerid][Overloaded] == true && DCheck[playerid] == true)
         {
               new DS[80], DName[MAX_PLAYER_NAME];GetPlayerName(playerid, DName, sizeof(DName));

               format(DS,sizeof(DS),"{00FF00}The player this with about-load.[Goal: Holding-it]", DName);
               Police_SendMessage(Msg);
               GameTextForPlayer(playerid,"You got caught by balance, cops were told to run", 3000, 5);
               SetPlayerColor(playerid, LARANJA);
               GetPlayerWantedLevel(playerid, + 1);
               TogglePlayerControllable(playerid, 0);
               DCheck[playerid] = false;
               SetTimerEx("DLiberar", 1000*30, false, "i", playerid);
               SetTimerEx("DCongelar", 1000*3, false, "i", playerid);
           return 1;
         }else GameTextForPlayer(playerid,"You're on the edge of loads!", 3000, 5);
     }
     return 1;
}
stock DCongelar(playerid)return TogglePlayerControllable(playerid, 1);
stock DLiberar(playerid)return DCheck[playerid] = true;



type:
You must be wondering what it does when it passes the balance on to load, response and simple.
He warned the cops to chase him and fine him and Setara its color to orange.



Credits

DonSpeed
PowerPC603


Never remove the credits.



Re: PPC_Balance - [E]ViL [D]RaGoN™ - 18.12.2012

Nice Work Bro


Re: PPC_Balance - Mr.Anonymous - 18.12.2012

I think you cannot include a .pwn file.


Re: PPC_Balance - Don_Speed - 19.12.2012

This GM and filled. However inc did this so he can use as include more. Pwn, to the usr well good!


Re: PPC_Balance - [HK]Ryder[AN] - 20.12.2012

Quote:
Originally Posted by Mr.Anonymous
View Post
I think you cannot include a .pwn file.
You CAN include any file type if it's in the correct location and you have valid code and it is readable