20.08.2011, 11:14
Sprunk/Snack System
By 4ir W4ys
By 4ir W4ys
I got a Sprunk Machine System. That giving the players Health. + Anims and Support'd By 3D text label. It's my First Script.
It's Is to use becuase the Defines. Acually the Defines are Controlling almost Everything:
pawn Code:
#include <a_samp>
#define SprunkCMD "/drink" // Change it, To the Command you want, The player will need to Type near the Sprunk Machine.
#define PlaceErrorMessage "Warning: You are not near Sprunk/Snack Machine" // Change It, To the Message you want the server show, If the PlayerIsn't near Sprunk Machine...
#define ErColor 0xFFFFFFFF // Change it, To the Color You want the server will send With the Error Messages ( It's Currectly White )
#define Cost 3 // Change it, To the Cost of a drink in the Sprunk Machine.
#define GiveHP 20 // Change it, To the Health the playe Will get if He using Sprunk Machine
#define CostErrorMessage "Warning: You don't Have Enough Money." // Chanhe it, To the Message That will show if the player Don't hav Enought Money
#define SPRUNK_COUNT 10 // Chanhe it, To the Max Sprunk Machnies you create'd ;D
Alright, Now I will Show you How to Create A Sprunk Machine:
First, Set the SPRUNK_COUNT in the defines to the number you want. Remember that the first SPRUNK COUNT is 0 and not 1 After That In public OnFilterScriptInit Write
This:
pawn Code:
public OnFilterScriptInit()
{
SM[0] = CreateSprunkMachine(Float:X, Float:Y, Float:Z, Float:Angle);
return 1;
}
Code:
Float:X - The X "co" You want to Set for the Sprunk machine Float:Y - The Y "co" You want to Set for the Sprunk machine Float:Z - The Z "co" You want to Set for the Sprunk machine Float:Angle - The Angle you want to Set for the Sprunk machine
With the Command you need to Type if you want to Drink som'. That's All in Short. Have fun with it
Download
>> Pastebin <<
btw: Dont remove my Credits pls.