Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new noeventskin[MAX_PLAYERS];
- CMD:joinevent(playerid, params[])
- {
- if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
- if(Event[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are already in the event.");
- if(!EventOn) return SendClientMessage(playerid, COLOR_GREY, "There's no current event happening.");
- if(EventLocked) return SendClientMessage(playerid, COLOR_GREY, "The event is locked, be faster next time.");
- PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
- PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
- GetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
- GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
- SetPlayerPos(playerid, ePos[0], ePos[1], ePos[2]);
- SetPlayerInterior(playerid, eInt);
- SetPlayerVirtualWorld(playerid, eVW);
- noeventskin[playerid] = GetPlayerSkin(playerid);
- SetPlayerSkin(playerid, EventSkin);
- for(new i=0; i<13; i++)
- {
- GetPlayerWeaponData(playerid, i, PlayerInfo[playerid][pWeapon][i], PlayerInfo[playerid][pWeaponAmmo][i]);
- }
- GunsBeingRemoved[playerid] = 1;
- ResetPlayerWeapons(playerid);
- Event[playerid] = 1;
- SendClientMessage(playerid, COLOR_LIGHTRED, "*** Please wait until the event starts and you will recieve everything set by the organizer ***");
- SendClientMessage(playerid, COLOR_LIGHTRED, "*** Your original health, armor and weapons will be refunded once you leave the event, /quitevent to leave at any time ***");
- return 1;
- }
- CMD:quitevent(playerid, params[])
- {
- if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
- if(!EventOn) return SendClientMessage(playerid, COLOR_GREY, "There's no current event happening.");
- if(!Event[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not inside the event.");
- Event[playerid] = 0;
- SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
- SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
- SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
- SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
- SetPlayerSkin(playerid, noeventskin[playerid]);
- SendClientMessage(playerid, COLOR_LIGHTRED, "*** You have quit the event ***");
- GunsBeingRemoved[playerid] = 1;
- ResetPlayerWeapons(playerid);
- GunsBeingRemoved[playerid] = 1;
- for(new w = 0; w < 13; w++)
- {
- GiveZaiatWeapon(playerid, PlayerInfo[playerid][pWeapon][w], PlayerInfo[playerid][pWeaponAmmo][w]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement