A better way to do this?
#3

Код:
#define MAX_EVENTS 10

new bool:Events[MAX_EVENTS];

CMD:allowjoin(playerid, params[])
{
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: YOUR NOT LOGGED IN AS AN ADMIN!");
        new event, string[128];
	if(sscanf(params, "i", event)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /allowjoin [Event]");
        Events[event] = true;
        format(string, sizeof(string), "An event %d has been started! Use '/joinevent %d' to join it!", event, event);
	SendClientMessageToAll(COLOR_GREEN, string);
	return 1;
}

CMD:joinevent(playerid, params[])
{
        new event;
	if(sscanf(params, "i", event)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /joinevent [Event]");
	/// SOMETHING GOES HERE
	return 1;
}
This way you can have multiple events...
Reply


Messages In This Thread
A better way to do this? - by BittleRyan - 20.08.2012, 05:31
Re: A better way to do this? - by PrawkC - 20.08.2012, 05:33
Re: A better way to do this? - by Shetch - 20.08.2012, 05:37
Re: A better way to do this? - by avivelkayam - 20.08.2012, 05:40

Forum Jump:


Users browsing this thread: 1 Guest(s)