06.04.2019, 11:32
Code:
YCMD:fpk(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, COLOR_WHITE, AdminOnly); new id,string[200],giveplayer[30],sendername[MAX_PLAYER_NAME]; if(sscanf(params, "u", id)) return SCM(playerid,COLOR_GREY, "USAGE: {FFFFFF}/auninvite <playerid/name>"); GetPlayerName(id, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(id)) { if(id != INVALID_PLAYER_ID) { if(PlayerInfo[id][pMember] == 0) return SCM(playerid, -1, "Acel player nu este intr-o factiune!"); format(string, sizeof(string), "Administratorul %s l-a scos pe %s din factiunea %s (rank %d) si %d zile.", GetName(playerid), GetName(id), FactionName(PlayerInfo[id][pMember]), PlayerInfo[id][pRank], PlayerInfo[id][pDays]); SendAdminMessage(COLOR_LIGHTRED, string, 4); format(string, sizeof(string), "* Ai fost scos din factiunea %s (rank %d) dupa %d zile de administratorul %s.",FactionName(PlayerInfo[id][pMember]), PlayerInfo[id][pRank], PlayerInfo[id][pDays], sendername); SCM(id, COLOR_LIGHTBLUE, string); new string2[280], query[256]; if(PlayerInfo[id][pAdmin] < 6) { format(string2, sizeof(string2), "%s a fost scos de Adminul %s din %s (rank %d) dupa %d zile.", GetName(id),GetName(playerid),FactionName(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],PlayerInfo[id][pDays]); mysql_format(SQL, query, sizeof(query), "INSERT INTO faction_logs (`text`,`player`,`leader`) VALUES ('%s','%d','%d')", string2, PlayerInfo[id][pSQLID], PlayerInfo[playerid][pSQLID]); mysql_tquery(SQL,query,"",""); } FactionMembers[PlayerInfo[id][pMember]] --; new faction = PlayerInfo[id][pMember]; PlayerInfo[id][pMember]=0; PlayerInfo[id][pLeader]=0; format(string, sizeof(string), "Administratorul %s l-a scos pe %s din factiunea %s (rank %d) si %d zile.", GetName(playerid), GetName(id), FactionName(faction), PlayerInfo[id][pRank], PlayerInfo[id][pDays]); SendFactionMessage(faction, COLOR_CLIENT, string); PlayerInfo[id][pRank] = 0; PlayerInfo[id][pChar] = 0; PlayerInfo[id][pFACWarns] = 0; PlayerInfo[id][pFpunish] = 0; PlayerInfo[id][pDays] = 0; WarSeconds[id] = 0; PlayerInfo[id][pLW] = 0; UpdateVar(id, "LW", 0); gTeam[id] = 3; PlayerInfo[id][pTeam] = 3; OnDuty[id] = 0; tazer[id] = 0; SetPlayerArmourEx(id, 0); SetPlayerSkinEx(id,PlayerInfo[id][pModel]); SetPlayerToTeamColor(id); format(query,sizeof(query),"UPDATE users SET `Member`='0',`Leader`='0',`Rank`='0',`CChar`='0',`FWarn`='0',`FPunish`='0',`Team`='3',`Days`='0' WHERE `ID`='%d'",PlayerInfo[id][pSQLID]); mysql_query(SQL,query); PlayerInfo[id][pCommands][0] = 0; ResetWeapons(id); format(query, sizeof(query), "UPDATE `users` SET `Commands`='%d' WHERE `ID`='%d'", PlayerInfo[id][pCommands][0], PlayerInfo[id][pSQLID]); mysql_query(SQL, query); //SpawnPlayer(id); PlayerTextDrawHide(playerid, WarTime); } } else SCM(playerid, COLOR_GREY, "Acel player nu este conectat."); return 1; }