11.03.2013, 20:36
I made a simple yet working DM GM, however i found a small problem that i thought i could fix on my own but i cant and its pissing me off cuz i think im on the right track xD
Anyway this is my problem. Once you die in a DM you should respawn on the DM, but i respawn in the lobby. This is my code, please tell me what im doing wrong.
DMs_Spawn - Function that i use to send the players to the chosen DM id in te first place
Players[playerid][DM] - Bool that tells me if the player is in the dm
Players[playerid][DMSpawn] - "Flag" that will make the player respawn in the dm
Anyway this is my problem. Once you die in a DM you should respawn on the DM, but i respawn in the lobby. This is my code, please tell me what im doing wrong.
Код:
public OnPlayerDeath(playerid, killerid, reason) { if (Players[playerid][DM]) Players[playerid][DMSpawn] = true; ... return 1; } public OnPlayerRequestSpawn(playerid) { if (Players[playerid][DMSpawn]) { Players[playerid][DMSpawn] = false; DMs_Spawn (playerid, Players[playerid][DMid]); return 1; } ... return 1; }
Players[playerid][DM] - Bool that tells me if the player is in the dm
Players[playerid][DMSpawn] - "Flag" that will make the player respawn in the dm