/quitevent command?
#1

What's a /quitevent command because my current one doesn't work?

Код:
if(strcmp(cmdtext, "/quitevent", true) == 0)
	{
		if(IsAtEvent[playerid] != 0)
		{
			SetPlayerWeapons(playerid);
			IsAtEvent[playerid] = 0;
			ResetPlayerAdminWeaponsEx(playerid);
		}
		return 1;
	}
That's my current one and when you're in the event and you type it, nothing happens.
Reply
#2

Whats the /joinevent command?
Reply
#3

Код:
if(strcmp(cmd, "/joinevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
		    if(ActiveEvent == 1)
			{
			    if(EventLocked == 1)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   The event is currently locked !");
			        return 1;
			    }
			    if(IsAtEvent[playerid] == 1)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   You have already joined the event !");
			        return 1;
			    }
			    if(EventX == 0.0 && EventY == 0.0 && EventZ == 0.0)
			    {
			        SendClientMessage(playerid, COLOR_GREY, "   The event spawn has not been set !");
			        return 1;
			    }
			    SetPlayerPos(playerid, EventX, EventY, EventZ);
			    IsAtEvent[playerid] = 1;
			    SetPlayerVirtualWorld(playerid, EventWorld);
			    SetPlayerInterior(playerid, EventInt);
			    SetPlayerHealth(playerid, EventHP);
			    SetPlayerArmour(playerid, EventArmour);
			    ResetPlayerAdminWeaponsEx(playerid);
			    ResetPlayerWeapons(playerid);
			    GivePlayerAdminGun(playerid, EventWeapon1);
			    GivePlayerAdminGun(playerid, EventWeapon2);
			    GivePlayerAdminGun(playerid, EventWeapon3);
			    GivePlayerAdminGun(playerid, EventWeapon4);
			    GivePlayerAdminGun(playerid, EventWeapon5);
			    if(EventJoinText == 1)
			    {
			        GameTextForPlayer(playerid, EventText, 5000, 0);
			    }
			    SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to the event.");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   There are currently no events active !");
			}
		}
		return 1;
Reply
#4

Try this,

pawn Код:
if(strcmp(cmdtext, "/quitevent", true) == 0)
    {
        if(IsAtEvent[playerid] == 1)
        {
            IsAtEvent[playerid] = 0;
            SetPlayerPos(playerid, 1550.2311, -1675.4509, 15.3155); //Los Santos Police Department
            SendClientMessage(playerid, COLOR_WHITE, "You have quit the event.");
            SetPlayerWeapons(playerid);
            ResetPlayerAdminWeaponsEx(playerid);
            ResetPlayerWeapons(playerid);
        }
        return 1;
    }
Reply
#5

That worked except, I lost my weapon I had before I joined the event, and when I /quitevent I didn't have it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)