[HELP] Event System
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
if(slot == 1) or switch(slot) should work. Don't use stringcompare for integers.
Still same problem, doesn't do anything when I enter the gunid.
I also tried switching between gunid & slot but nothing happens.
Simply nothing happens when I enter anything after /setevent weapons

pawn Код:
CMD:setevent(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(EventInfo[eStarted]) return SendClientMessage(playerid, COLOR_GRAD1, "You have already started the event.");
        new eventrelated[24];
        new slot;
        new gunid;
        new message[32];
        if(sscanf(params, "s", eventrelated)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setevent [position - weapons]");
        if(!strcmp(eventrelated, "position", true))
        {
            EventInfo[eInt] = GetPlayerInterior(playerid);
            GetPlayerPos(playerid, EventInfo[eX], EventInfo[eY], EventInfo[eZ]);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have set the event's starting position.");
        }
        else if(!strcmp(eventrelated, "weapons", true))
        {
            if(sscanf(params, "sii", eventrelated, gunid, slot)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setevent weapons [gun id] [slot(1-3)]");
            if(slot == 1)
            {
                EventInfo[eSlot1] = gunid;
                format(message, sizeof(message), "You have set the event's slot 1 gun to %s", gunid);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, message);
            }
            else if(slot == 2)
            {
                EventInfo[eSlot2] = gunid;
                format(message, sizeof(message), "You have set the event's slot 2 gun to %s", gunid);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, message);
            }
            else if(slot == 3)
            {
                EventInfo[eSlot3] = gunid;
                format(message, sizeof(message), "You have set the event's slot 3 gun to %s", gunid);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, message);
            }
        }
    }
    return 1;
}
@ Daren: Well, I appreciate that but I don't really like your system :S
Reply


Messages In This Thread
[HELP] Event System - by Dudits - 01.08.2010, 02:04
Re: [HELP] Event System - by Dudits - 01.08.2010, 05:00
Re: [HELP] Event System - by Dudits - 01.08.2010, 12:11
Re: [HELP] Event System - by Vince - 01.08.2010, 13:24
Re: [HELP] Event System - by Daren_Jacobson - 01.08.2010, 14:53
Re: [HELP] Event System - by Dudits - 02.08.2010, 00:55
Re: [HELP] Event System - by PotH3Ad - 02.08.2010, 01:04
Re: [HELP] Event System - by Dudits - 02.08.2010, 01:09
Re: [HELP] Event System - by Dudits - 02.08.2010, 02:44
Re: [HELP] Event System - by Dudits - 02.08.2010, 05:59

Forum Jump:


Users browsing this thread: 2 Guest(s)