21.01.2018, 04:57
(
Последний раз редактировалось Ultrashot; 21.01.2018 в 06:32.
)
hi dear,
i'm using An event system, it's working Good but when i create an event at place 'A' according to this eventsystem eveyone who do /join should be spawned at place 'A', but problem is that i dosn't spawn players at 'A' instead it spawn them at random places .
(it just works for creator only,it spawn eventcreator(admin) on correct place not all players) : can some one please slove this ?
i'll be thankfull to u :
sorry for bad english <3
have a nice day
//------------------------------------
i'm using An event system, it's working Good but when i create an event at place 'A' according to this eventsystem eveyone who do /join should be spawned at place 'A', but problem is that i dosn't spawn players at 'A' instead it spawn them at random places .
(it just works for creator only,it spawn eventcreator(admin) on correct place not all players) : can some one please slove this ?
i'll be thankfull to u :
sorry for bad english <3
have a nice day
//------------------------------------
Код:
CMD:startevent(playerid,params[]) { new string[128]; new sstring[128]; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"Unknown command. Please use the correct commands."); if(joinable==1) return SendClientMessage(playerid,COLOR_RED,"There is already an event going on."); else if(sscanf(params,"s[128]iiiiii",ename,eprize,gun1,ammo1,gun2,ammo2)) return SendClientMessage(playerid,COLOR_PINK,"USAGE: /startevent [Event name (to be displayed)] [Prize] [Event weapon 1] [Ammo] [Event weapon 2] [Ammo]."); else if(gun1 > 39 || gun1 < 0) return SendClientMessage(playerid,COLOR_ORANGE,"What do you expect, a stick? Use weapon IDs within 0-40!"); else if(gun2 > 39 || gun2 < 0) return SendClientMessage(playerid,COLOR_ORANGE,"What do you expect, a stick? Use weapon IDs within 0-40!"); else { format(string,128,"'%s' has been started as an event! Use /join to join the fun!",ename); format(sstring,128,"~n~~n~~b~'%s' ~w~has been started!~w~Use ~g~/join to join the fun!",ename); SendClientMessageToAll(COLOR_LIGHTBLUE,string); GameTextForAll(sstring,5000,5); joinable=1; new Float:p1; new Float:p2; new Float:p3; GetPlayerPos(playerid,p1,p2,p3); SetPVarFloat(playerid,"locx",p1); SetPVarFloat(playerid,"locy",p2); SetPVarFloat(playerid,"locz",p3); } return 1; } CMD:join(playerid,params[]) { new s[128]; if(joinable==0) return SendClientMessage(playerid,COLOR_RED,"No events are going on, currently."); if(locked==1) { format(s,128,"The event '%s' has been locked by an admin. You cannot join it.",ename); SendClientMessage(playerid,COLOR_RED,s); return 1;} else { SetPlayerPos(playerid,GetPVarFloat(playerid, "locx"),GetPVarFloat(playerid, "locy"),GetPVarFloat(playerid, "locz")); SendClientMessage(playerid,COLOR_GREEN,"You have joined the event!"); GivePlayerWeapon(playerid,gun1,ammo1); GivePlayerWeapon(playerid,gun2,ammo2); joined[playerid]=1; } return 1; }