What's Wrong?
#1

When i do /startEvent, and then /joinevent, It crashes my RCON and Server Shuts Down, There a Problem with that?

pawn Код:
if(strcmp(cmd, "/startevent", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 5 && (!EventStarted))
            {
                EventStarted = 1;
                EventLocked = 0;
                GetPlayerPos(playerid,ex,ey,ez);
                GetPlayerVirtualWorld(playerid);
                GetPlayerInterior(playerid);
                BroadCast(COLOR_LIGHTBLUE, "** Notice: An Event has started, use /joinevent.");
            }
            else if (PlayerInfo[playerid][pAdmin] >= 5 && (EventStarted))
            {
                EventStarted = 0;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
            }
        }
        return 1;
    }
pawn Код:
if(strcmp(cmd, "/joinevent", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(EventStarted == 0)
            {
                  SendClientMessage(playerid, COLOR_LIGHTBLUE, " ** An Event has not Started.");
                  return 1;
            }
            else if(EventLocked == 1)
            {
                  SendClientMessage(playerid, COLOR_RED, "** The event is locked.");
                  return 1;
            }
            new EJoin = strval(tmp);
            new vw = GetPlayerVirtualWorld(playerid);
            SetPlayerPos(playerid,ex,ey,ez);
            SetPlayerVirtualWorld(playerid,vw);
            SetPlayerInterior(playerid,EventInfo[EJoin][EInterior]);
            PlayerInfo[playerid][pInt] = EventInfo[EJoin][EInterior];
        }
        return 1;
    }
Reply


Messages In This Thread
/startevent - by dannyk0ed - 06.05.2011, 23:42
Re: What's Wrong? - by leong124 - 07.05.2011, 02:42
Re: What's Wrong? - by Bakr - 07.05.2011, 04:10
Re: What's Wrong? - by Seven_of_Nine - 07.05.2011, 04:17
Re: What's Wrong? - by Joe Staff - 07.05.2011, 04:19
Re: What's Wrong? - by [DM]Kane - 07.05.2011, 04:33

Forum Jump:


Users browsing this thread: 2 Guest(s)