Jump to content

[REZOLVAT] Problemă gamemode Burned Big edit


Fuhrer
 Share

Recommended Posts

  • Administrator
Bun, din cate vad in codul din panel, ai tabelul 'faction_logs' cu 'id' si 'text'.

 

Du-te in baza de date, sterge vehicul tabel 'faction_logs' si creaza un tabel nou, pe care-l denumesti 'faction_logs' si adaugi coloana 'id' de tip INT cu A_L(auto increment) si coloana 'Text' de tip TEXT

 


 

Si la comanda [/setleader] faci in felul urmator:

 



YCMD:setleader(playerid, params[], help) {
if(PlayerInfo[playerid][pAdmin] new id,level,string[180];
if(sscanf(params, "ui",id,level)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setleader ");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
if(level > 15 || level
if(PlayerInfo[id][pMember] > 0 && PlayerInfo[id][pLeader] > 0) return SCM(playerid,COLOR_WHITE, "Acel player este intr-o factiune.");
format(string, sizeof(string), "%s este noul lider al factiunii.", GetName(id));
SendFactionMessage(level, COLOR_CLIENT, string);

new ftext[50];
format(ftext, sizeof(ftext), FactionName(level));
PlayerInfo[id][pMember] = level;

if(PlayerInfo[playerid][pMember] == 11) finishAchievement(id, 29);
else if(IsACop(playerid)) finishAchievement(id, 30);
else if(IsAMember(playerid)) finishAchievement(id, 31);
else finishAchievement(id, 28);


PlayerInfo[id][pLeader] = level;
FactionMembers[PlayerInfo[id][pMember]] ++;
if(level == 0) { PlayerInfo[id][pChar] = 0; }
else if(level == 1) { PlayerInfo[id][pChar] = 265; } //Police Departament
else if(level == 2) { PlayerInfo[id][pChar] = 295; } //FBI
else if(level == 3) { PlayerInfo[id][pChar] = 179; } //National Guard
else if(level == 4) { PlayerInfo[id][pChar] = 270; } //Triad
else if(level == 5) { PlayerInfo[id][pChar] = 292; } //Los Vagos
else if(level == 6) { PlayerInfo[id][pChar] = 273; } //Ballas
else if(level == 7) { PlayerInfo[id][pChar] = 258; } //School Instructors
else if(level == 8) { PlayerInfo[id][pChar] = 59; } //Tow Car Company
else if(level == 9) { PlayerInfo[id][pChar] = 228; } //News Reporters
else if(level == 10) { PlayerInfo[id][pChar] = 296; } //Los Aztecas
else if(level == 11) { PlayerInfo[id][pChar] = 294; } //Hitman
else if(level == 12) { PlayerInfo[id][pChar] = 272; } //School Instructors
else if(level == 13) { PlayerInfo[id][pChar] = 70; } //Paramedic

if(IsACop(id)) SetPlayerSkinEx(id, 305);
else SetPlayerSkinEx(id, PlayerInfo[id][pChar]);
PlayerInfo[id][pRank] = 7;
SetPlayerToTeamColor(id);

new query[256];
format(string, sizeof(string), "%s este liderul factiunii %s.", GetName(id), ftext);
if(PlayerInfo[id][pAdmin] mysql_format(SQL, query, sizeof(query), "INSERT INTO `faction_logs` (`text`) VALUES ('%s')", string);
mysql_tquery(SQL, query, "", "");
}

format(query,sizeof(query),"UPDATE users SET `Leader`='%d',`Member`='%d',`Rank`='7',`Team`='%d',`CChar`='%d' WHERE `ID`='%d'",PlayerInfo[id][pLeader],PlayerInfo[id][pMember],PlayerInfo[id][pTeam],PlayerInfo[id][pChar],PlayerInfo[id][pSQLID]);
mysql_query(SQL,query);
format(string, sizeof(string), "L-ai promovat pe %s ca lider la factiunea %s.", GetName(id),ftext);
SCM(playerid, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "Admin %s te-a promovat ca lider al factiunii %s.", GetName(playerid),ftext);
SCM(id, COLOR_LIGHTBLUE, string);

return 1;
}

Link to comment
Share on other sites

  • Administrator

Daca vrei sa scapi de acel 'Auto-Login' cauta functia 'CheckClassIP( playerid )' si sterge 

if(strcmp(playerIP, "127.0.0.1", true) == 0 && strcmp(GetName(playerid), "Edison", true) == 0) {
	OnPlayerLogin(playerid,MD5_Hash("enuisap"));
	PlayerInfo[playerid][pPinLogged] = 1;
	SCM(playerid, COLOR_WARNING, "[AUTO-LOGIN] Te-ai logat automat!");
}


Si dupa in loc de 'else if' la verificarea de sub ea, pui 'id'

if(test != 0) {
	new string[180], name[MAX_PLAYER_NAME], by[MAX_PLAYER_NAME], date[100], reason[64];
	cache_get_field_content(0, "Name", name);
	cache_get_field_content(0, "By", by);
	cache_get_field_content(0, "Date", date);
	cache_get_field_content(0, "Reason", reason);
	for( new j = 0; j <= 100; j++) SendClientMessage(playerid, COLOR_WHITE, "");	
	format(string, sizeof(string), "Acest cont este banat permanent pe IP de %s de pe %s!", by, date);
	SCM(playerid, COLOR_WARNING, string);
	format(string, sizeof(string), "Contul pe care s-a luat ban este %s.", name);
	SCM(playerid, COLOR_CLIENT, string);
	format(string, sizeof(string), "Motivul: %s", reason);
	SCM(playerid, COLOR_CLIENT, string);		
	format(string, sizeof(string), "Daca consideri ca ai primit ban aiurea, fa o cerere de unban pe burned.ro/panel/unbans!", reason);
	SCM(playerid, COLOR_CLIENT, string);	
		
	SetPlayerCameraPos(playerid, 1183.0143, -965.7394, 129.6071);
	SetPlayerCameraLookAt(playerid, 1183.7214, -965.0270, 129.2470);
	TogglePlayerSpectating(playerid, 0);
	KickEx(playerid);	
}
Link to comment
Share on other sites

@@Fuhrer nu vad vreo eroare care sa confirme ca interogarea de la comanda [/setleader] nu ar functiona..

 

Probabil cel care a editat gamemode-ul, a facut ceva gresit si l-a buguit.

 

Dacă fac cum ai spus tu, îmi dă aceste erori: https://pastebin.com/0NF4feya

 

Aici te referi să pun id, în loc de else if, nu ?: https://imgur.com/a/5i8srSn

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...