14.03.2019, 14:18
pawn Код:
enum E_EVENT_INFO
{
Float:eventX,
Float:eventY,
Float:eventZ,
bool:eventOrganizer
}
new EventInfo[MAX_PLAYERS][E_EVENT_INFO];
CMD:startevent(playerid, params[])
{
foreach(new i : Player){
if(EventInfo[i][eventOrganizer])
// an event is already started, return something
}
EventInfo[playerid][eventOrganizer] = true;
GetPlayerPos(playerid, EventInfo[playerid][eventX], EventInfo[playerid][eventY], EventInfo[playerid][eventZ]);
return 1;
}
CMD:tpevent(playerid, params[])
{
foreach(new i : Player){
if(!EventInfo[i][eventOrganizer]) continue;
return SetPlayerPos(playerid, EventInfo[i][eventX], EventInfo[i][eventY], EventInfo[i][eventZ]);
}
// no one has started any event
return 1;
}