16.03.2012, 20:49
how i make a cmd /accept invite and /decline invite ?? and how i make when leader type /giverank ID to change skin to member to the mafia etc. can any help me ?
new challengedPlayers[MAX_PLAYERS]; new challengers[MAX_PLAYERS]; dcmd_duel(playerid, params[]) { new id = strval(params[0]); challengers[playerid] = 1; challengedPlayers[playerid] = 1; SendClientMessage(id, 0x0000FF, "You have been challenged to a duel! Type /accept or decline."); } dcmd_accept(playerid, params[]) { new id = params[0] //Challenger ID. if (challengedPlayers[playerid] == 1 && IsPlayerConnected(playerid) && IsPlayerConnected(id)) { //Start duel } } dcmd_decline(playerid, params[]) { new id = params[0] //Challenger ID. challengedPlayers[playerid] = 0; challengers[id] = 0; SendClientMessage(id, 0xCC0000, "Your opponent refused your challenge."); return 1; }