17.02.2018, 15:27
how do i know this cmd won't count user as someone else? let's say 30 ppl ig and it will count someone randomally as user
or is it ok?
Код:
CMD:duelquit(playerid, params[]) { if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5); if(duelinfo[playerid][induel] == 0) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You're not in duel!"); else { new user, str[128], name[MAX_PLAYER_NAME]; duelinfo[playerid][induel] = 0; duelinfo[user][induel] = 0; invite[playerid] = 0; inviter[playerid] = 0; invite[user] = 0; inviter[user] = 0; SetPlayerArmour(playerid, 0); SetPlayerArmour(user, 0); SpawnPlayer(playerid); SpawnPlayer(user); GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "{c3c3c3}(DUEL) %s has left the duel!", name); SendClientMessageToAll(-1, str); } return 1; }