Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- new robcasino;
- forward RobAgain2();
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- #define COLOR_DODGERBLUE 0x1E90FFAA
- #define COLOR_ERROR 0xD2691EAA
- #define COLOR_SYSTEM 0x9ACD32AA
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetTimer("RobAgain2",1800000,1);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(robcasino,9,cmdtext);
- return 0;
- }
- dcmd_robcasino(playerid, params[])
- {
- if(PlayerToPoint(3, playerid, 1141.822509,9.046521,1000.671875))
- {
- SetTimer("robtimer",40000,false);
- new id = strval(params);
- new name[24],pname[24],string[256],reason[24];
- GetPlayerName( playerid, name, 24 );
- GetPlayerName( id, pname, 24 );
- format(string,sizeof(string),"%s Has begin to rob the casino",name,pname,reason);
- SendClientMessageToAll(COLOR_SYSTEM,string);
- }
- return 1;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == robcasino)
- {
- GameTextForPlayer(playerid,"~w~Type /robcasino.",5000,5);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement