Advertisement
Guest User

Untitled

a guest
Dec 14th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.73 KB | None | 0 0
  1. new noeventskin[MAX_PLAYERS];
  2. CMD:joinevent(playerid, params[])
  3. {
  4.     if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
  5.     if(Event[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are already in the event.");
  6.     if(!EventOn) return SendClientMessage(playerid, COLOR_GREY, "There's no current event happening.");
  7.     if(EventLocked) return SendClientMessage(playerid, COLOR_GREY, "The event is locked, be faster next time.");
  8.     PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
  9.     PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
  10.     GetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
  11.     GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  12.     GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  13.     SetPlayerPos(playerid, ePos[0], ePos[1], ePos[2]);
  14.     SetPlayerInterior(playerid, eInt);
  15.     SetPlayerVirtualWorld(playerid, eVW);
  16.     noeventskin[playerid] = GetPlayerSkin(playerid);
  17.     SetPlayerSkin(playerid, EventSkin);
  18.     for(new i=0; i<13; i++)
  19.     {
  20.         GetPlayerWeaponData(playerid, i, PlayerInfo[playerid][pWeapon][i], PlayerInfo[playerid][pWeaponAmmo][i]);
  21.     }
  22.     GunsBeingRemoved[playerid] = 1;
  23.     ResetPlayerWeapons(playerid);
  24.     Event[playerid] = 1;
  25.     SendClientMessage(playerid, COLOR_LIGHTRED, "*** Please wait until the event starts and you will recieve everything set by the organizer ***");
  26.     SendClientMessage(playerid, COLOR_LIGHTRED, "*** Your original health, armor and weapons will be refunded once you leave the event, /quitevent to leave at any time ***");
  27.     return 1;
  28. }
  29.  
  30. CMD:quitevent(playerid, params[])
  31. {
  32.     if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
  33.     if(!EventOn) return SendClientMessage(playerid, COLOR_GREY, "There's no current event happening.");
  34.     if(!Event[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not inside the event.");
  35.     Event[playerid] = 0;
  36.     SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
  37.     SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
  38.     SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
  39.     SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
  40.     SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  41.     SetPlayerSkin(playerid, noeventskin[playerid]);
  42.     SendClientMessage(playerid, COLOR_LIGHTRED, "*** You have quit the event ***");
  43.     GunsBeingRemoved[playerid] = 1;
  44.     ResetPlayerWeapons(playerid);
  45.     GunsBeingRemoved[playerid] = 1;
  46.     for(new w = 0; w < 13; w++)
  47.     {
  48.         GiveZaiatWeapon(playerid, PlayerInfo[playerid][pWeapon][w], PlayerInfo[playerid][pWeaponAmmo][w]);
  49.     }
  50.     return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement