17.02.2018, 15:48
you can SWAP player's IDs when they accept your duel system by command, you just have to add variables or just PVars for swapping.
for example at /accept command u must place:
SetPVarInt(playerid,"DuelerPlayerID",user);
SetPVarInt(user,"DuelerPlayerID",playerid);
and than u must use these params on this command - duelquit
user = GetPVarInt(playerid,"DuelerPlayerID");
he doesn't uses "user" as player name, he's using this like player ID (targets in command)
for example at /accept command u must place:
SetPVarInt(playerid,"DuelerPlayerID",user);
SetPVarInt(user,"DuelerPlayerID",playerid);
and than u must use these params on this command - duelquit
user = GetPVarInt(playerid,"DuelerPlayerID");
he doesn't uses "user" as player name, he's using this like player ID (targets in command)