23.04.2013, 17:14
(
Последний раз редактировалось AmsterdamCopsAndRobbers; 24.04.2013 в 05:45.
)
Hello every one I'am AMCNR and i will gonna show you an Tutorial.
In This Tut. I will show you how to make a Robbery system.
Let's begin
Lesson 1:
Include a_samp
and ZCMD
Lesson 2:
Define some colors.
PS: I got much not needed!
Lesson 3:
Lesson 4:
Add Some Timers and Robbery System Things.
PS: I'dont really give the timers a name.
Lesson 5:
Let's begin coding some commands.
Lesson 6:
Important stuff
Thanks for reading i hope it helped you.
I Only made a robbery system for bank but you can copy the things change the names the Timers etc.
PS: IF YOU THINK I STOLE THIS IT IS'NT TRUE!
+ rep can not hurt.
Greatz
-AMCNR
In This Tut. I will show you how to make a Robbery system.
Let's begin
Lesson 1:
Код:
#include <a_samp> #include <zcmd>
and ZCMD
Lesson 2:
Код:
#define COLOR_LOCALMSG 0xEC5413AA #define COLOR_BLUE 0x0000FFAA #define COLOR_AQUA 0x00FFFFAA #define COLOR_ADMINCMD 0xF97804FF #define COLOR_ADMINDUTY 0x007E96F6 #define COLOR_NOTLOGGED 0x00000000 #define COLOR_GRAD1 0xB4B5B7FF #define COLOR_GRAD2 0xBFC0C2FF #define COLOR_MONEYBAR 0x005800FF #define COLOR_GRAD3 0xCBCCCEFF #define COLOR_GRAD4 0xD8D8D8FF #define COLOR_GRAD5 0xE3E3E3FF #define COLOR_GRAD6 0xF0F0F0FF #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_DARKRED 0xCD000000 #define COLOR_ANTICHEAT 0xAA3333AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_LIGHTGREEN 0x9ACD32AA #define COLOR_LIGHTRED 0xFF6347AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_LIGHTBLUE2 0x0080FFAA #define COLOR_LIGHTGREEN 0x9ACD32AA #define COLOR_LIGHTORANGE 0xFF8000FF #define COLOR_DARKBROWN 0xB36C42FF #define COLOR_MEDIUMBLUE 0x1ED5C7FF #define COLOR_LIGHTYELLOW 0xE0E377AA #define COLOR_LIGHTYELLOW2 0xE0EA64AA #define COLOR_LIGHTYELLOW3 0xFF6347AA #define COLOR_DARKPURPLE 0x5F56F8AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_YELLOW2 0xF5DEB3AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_FADE1 0xE6E6E6E6 #define COLOR_FADE2 0xC8C8C8C8 #define COLOR_FADE3 0xAAAAAAAA #define COLOR_FADE4 0x8C8C8C8C #define COLOR_FADE5 0x6E6E6E6E #define COLOR_PURPLE 0xC2A2DAAA #define COLOR_DBLUE 0x2641FEAA #define COLOR_ALLDEPT 0xFF8282AA #define COLOR_NEWS 0xFFA500AA #define COLOR_OOC 0xE0FFFFAA #define COLOR_NEWOOC 0x0080FFAA #define COLOR_RED 0xFF0000FF
PS: I got much not needed!
Lesson 3:
Код:
//Now you can add on Your OnGameModeInIt 3dTextlabels Else Checkpoints or Pickups What u want. //here I'dont gonna show.
Код:
new Robbank[MAX_PLAYERS]; new Robammu[MAX_PLAYERS]; new Robcityhall[MAX_PLAYERS]; new Robgasstation[MAX_PLAYERS]; new Robpizza[MAX_PLAYERS]; new Robgym[MAX_PLAYERS]; new Robatm[MAX_PLAYERS];
PS: I'dont really give the timers a name.
Lesson 5:
Код:
CMD:robbank(playerid, params[]) //Command robbank { if (Robbank[playerid] == 0 ) //Getting If Your not recently robbed the bank if(IsPlayerInRangeOfPoint(playerid,2.0,2309.6543,-8.5004,26.7422)) //Gets your Pos. { SendClientMessage(playerid, COLOR_GREEN, "You robbing the bank 30 seconds left!"); //Sending a ClientMessage 30 sec left Robbank[playerid] = 1; // Give's your Recently Robbed SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+3); //Sets your wanted level to 3 SetTimerEx("RobBank", 30000, false, "i", playerid); //Timer 1 Ticks when your robbing 30 seconds SetTimerEx("after1", 50000, false, "i", playerid); } else { SendClientMessage(playerid, COLOR_RED, "[ERROR:]You are no in rob checkpoint!"); // Sends a SCM Your not on a Checkpoint. } return 1; }
Lesson 6:
Код:
forward RobBank(playerid); //Forwards your public public RobBank(playerid) { new rand = random(130000)+0; //When your robbing you get 0-130000 cash random GivePlayerMoney(playerid,rand); //it Gives your the random cash SendClientMessage(playerid, COLOR_GREEN, "You Rob the bank and now have 3 wanted level!"); //Gives you 3 wanted stars TogglePlayerControllable(playerid,1); //You can walk again return 1; }
Thanks for reading i hope it helped you.
I Only made a robbery system for bank but you can copy the things change the names the Timers etc.
PS: IF YOU THINK I STOLE THIS IT IS'NT TRUE!
+ rep can not hurt.
Greatz
-AMCNR