06.03.2015, 13:46
(
Последний раз редактировалось _GHT_MarK445; 06.03.2015 в 15:16.
)
Hi guys,
i have a problem, i am solving this one over a week now, and me and my friend, just cant solve it and make it work, like it have to, so i am turning on you guys, to help me with this.
How it works now (UNCORRECT)
If the player writes /dueljoin it moves him, to the duel(SetPlayerPos), but the duel starts immediately.
How it have to work (CORRECT)
If the first dueler, join the duel, he should be frozen. And if the second dueler join in, it should start the duel.
------------------------------------------------
So guys, if you would be enable to get a soultion, how to fix it, what is wrong with it, i would really, really appreciate it, and off course REP+ you.
Command /dueljoin:
For any help i would be really really HAPPY!
i have a problem, i am solving this one over a week now, and me and my friend, just cant solve it and make it work, like it have to, so i am turning on you guys, to help me with this.
How it works now (UNCORRECT)
If the player writes /dueljoin it moves him, to the duel(SetPlayerPos), but the duel starts immediately.
How it have to work (CORRECT)
If the first dueler, join the duel, he should be frozen. And if the second dueler join in, it should start the duel.
------------------------------------------------
So guys, if you would be enable to get a soultion, how to fix it, what is wrong with it, i would really, really appreciate it, and off course REP+ you.
Command /dueljoin:
Код:
CMD:dueljoin(playerid, params[]) { #pragma unused params if(Duelers > 1) return SendClientMessage(playerid, COLOR_GREY, "[ CHYBA ] Duel is already full."); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0); SetPlayerVirtualWorld(playerid, 1); TogglePlayerControllable(playerid, 0); if(Dueler[0] == INVALID_PLAYER_ID) Dueler[0] = playerid; else if(Dueler[1] == INVALID_PLAYER_ID) Dueler[1] = playerid; if(Dueler[0] == playerid) { SetPlayerPos(playerid, 1869.6478,-1748.4121,5206.0859); new string[128]; format(string, sizeof(string), "[ DUEL ] Player %s joined the duel, type /dueljoin to join the duel and fight with him!",GetName(playerid)); SendClientMessageToAll(COLOR_RED, string); } if(Dueler[1] == playerid) { SetPlayerPos(playerid, 1874.0762,-1744.3434,5206.0859); new string[128]; format(string, sizeof(string), "[ DUEL ] Player %s joined the duel, duel has started!",GetName(playerid)); SendClientMessageToAll(COLOR_RED, string); TogglePlayerControllable(playerid, 1); TogglePlayerControllable(Dueler[0], 1); GameTextForPlayer(playerid, "Duel started!", 500, 1); } return 1; }