event system help
#1

im making an event system and i want to do it like this and i don't kniw how

When an admin is using /startevent,i want to save his position

When a player types /tpevent i want him teleported to the admin's saved position

What i did so far teleports a player to the admin's position but its not the same position for everyone ,like,it teleports each player to the admin's position in that moment,when the player types the command

CMDtartevent(playerid, params[])
{
EventOrganizer[playerid] = 1;
return 1;
}


CMD:tpevent(playerid, params[])
{
foreach(new i : Player){
if(EventOrganizer[i] == 1){
GetPlayerPos(i, Float, Float:y, Float:z);
}
SetPlayerPos(playerid, Float, Float:y, Float:z);
}

return 1;
}
Reply


Messages In This Thread
event system help - by bosmania - 14.03.2019, 14:00
Re: event system help - by TheToretto - 14.03.2019, 14:18
Re: event system help - by bosmania - 14.03.2019, 14:22
Re: event system help - by TheToretto - 14.03.2019, 14:24
Re: event system help - by bosmania - 14.03.2019, 14:45
Re: event system help - by Gameluner - 14.03.2019, 15:01
Re: event system help - by SymonClash - 14.03.2019, 20:15

Forum Jump:


Users browsing this thread: 2 Guest(s)