Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- // DEAGLE DEATHMATCH MINGAME BY SOCAN, KEEP CREDITS //
- ////////////////////////////////////////////////////////////////////////////////
- #include a_samp //Thanks to the SA-MP team
- #include zcmd //Thanks to Zeex
- new DmMinigames[MAX_PLAYERS];
- public OnGameModeInit()
- {
- Create3DTextLabel("{451EE1}Deagle\n Mini game! \n/play to enter\n{008040}Cost: $5000", 0x008080FF, -1724.9291,-26.2646,3.5547, 0, 0);
- print("\n-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
- print("Deagle Deathmatch by Socan loading..");
- print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- DmMinigames[playerid] = 0;
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- DmMinigames[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- DmMinigames[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- CMD:play(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, -1724.9291,-26.2646,3.5547))
- //if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x,Float:y,Float:z)) USE THIS TO ADD MORE PLACES IN
- {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- if(GetPlayerMoney(playerid) <5000)
- return SendClientMessage(playerid, -1, "{FF0000}You dont have enough money to Deagle Mini Game");
- GivePlayerMoney(playerid, -5000);
- SetPlayerPos(playerid, 1302.519897,-1.787510,1001.028259);
- SetPlayerInterior(playerid, 18);
- SetPlayerVirtualWorld(playerid, 87);
- SetPlayerArmour(playerid, 100);
- SetPlayerHealth(playerid, 100);
- GivePlayerWeapon(playerid, 24, 99999);
- DmMinigames[playerid] = 1;
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"{008040}%s has joined Deagle Minigame!",pName);
- SendClientMessageToAll(0xFFFFFFAA,string);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}You are not at SF docks Deagle Minigame!");
- return 1;
- }
- return 1;
- }
- CMD:leave(playerid, params[])
- {
- if(DmMinigames[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"{FF0000}You're not in Deagle Deathmatch Mini Game and can not do this command!");
- }
- else
- {
- new string[128];
- new pName[MAX_PLAYER_NAME];
- DmMinigames[playerid] = 0;
- SetPlayerPos(playerid, -1724.9291,-26.2646,3.5547);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- ResetPlayerWeapons(playerid);
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"{008040}%s has left Deagle Minigame!",pName);
- SendClientMessageToAll(0xFFFFFFAA,string);
- }
- return 1;
- }
- CMD:test(playerid, params[])
- {
- if(DmMinigames[playerid]) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {AAAAAA}You can not use other commands while in a Mini Game!");
- //Add your code here for command.
- return 1;
- }
- CMD:dm(playerid, params[])
- {
- SetPlayerPos(playerid, -1724.9291,-26.2646,3.5547);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement