Jump to content

[REZOLVAT] urgent


CRISTIANN
 Share

Recommended Posts

De ce imi apare asa la comanda /setadmin

 

 

C:\Users\ABC\Desktop\gamemode burned edited by Cosmin\gamemodes\gmm.pwn(18024) : warning 202: number of arguments does not match definition
C:\Users\ABC\Desktop\gamemode burned edited by Cosmin\gamemodes\gmm.pwn(18053) : error 076: syntax error in the expression, or invalid function call
C:\Users\ABC\Desktop\gamemode burned edited by Cosmin\gamemodes\gmm.pwn(18059) : warning 202: number of arguments does not match definition
C:\Users\ABC\Desktop\gamemode burned edited by Cosmin\gamemodes\gmm.pwn(38279) : warning 203: symbol is never used: "HelpersDuty@YSII_Cg"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
1 Error.
 
 
ma puteti ajuta cu comenzile /setadmin si /sethelper pentru gm-ul burned? multumesc.
Link to comment
Share on other sites

YCMD:setadmin(playerid, params[]) {

if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);

new id,adminlevel,string[200];

if(sscanf(params, "ui",id,adminlevel)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/setadmin <playerid/name> <Admin Level>");

if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");

if(adminlevel < 0 || adminlevel > 6) return SCM(playerid, COLOR_GREY, "Invalid admin level! (0-6)");

if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "Nu poti executa aceasta comanda pe acel player!");

 

format(string, sizeof(string), "Ai fost promovat la admin %d de %s.", adminlevel, GetName(playerid));

SendClientMessage(id, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "I-ai setat lui %s admin %d.", GetName(id),adminlevel);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "AdmCmd: %s i-a setat lui %s admin %d.", GetName(playerid),GetName(id),adminlevel);

if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,4);

 

if(adminlevel == 0) {

PlayerInfo[id][pAW] = 0;

UpdateVar(id, "AW", 0);

SpecFaction[id] = 0;

StopFly(playerid);

UsedFly[playerid] = 0;

SetPlayerHealthEx(playerid, 99);

SendClientMessage(playerid, 0xFFADADFF, "Fly mode off.");

}

else finishAchievement(id, 27);

PlayerInfo[id][pAdmin] = adminlevel;

 

new query[180];

 

if(adminlevel >= 1) format(query,sizeof(query),"UPDATE users SET `Admin`='%d', `Security`='%s',`HelpedPlayers`='0' WHERE `ID`='%d'",PlayerInfo[id][pAdmin], MD5_Hash, PlayerInfo[id][pSQLID]);

else format(query,sizeof(query),"UPDATE users SET `Admin`='%d' WHERE `ID`='%d'",PlayerInfo[id][pAdmin],PlayerInfo[id][pSQLID]);

mysql_query(SQL,query);

SetPVarInt(id, "SecurityPlayer", 0);

return 1;

}

YCMD:sethelper(playerid, params[]) {

if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);

new id, string[180], lvl;

if(sscanf(params, "ui",id, lvl)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/sethelper <playerid/name> <level(0-3)>");

if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");

if(lvl < 0 || lvl > 3) return SCM(playerid, COLOR_GREY, "Invalid helper level! (0-3)");

 

PlayerInfo[id][pHelper] = lvl;

if(lvl > 0) {

format(string, sizeof(string), "Ai fost promovat ca helper level %d de %s.", lvl, GetName(playerid));

SendClientMessage(id, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "I-ai setat lui %s helper %d.", GetName(id));

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

finishAchievement(id, 26);

}

else {

HelperDuty[playerid] = 0, HaveHelp[playerid] = -1;

format(string, sizeof(string), "Ai fost scos din functia de helper de %s.", GetName(playerid));

SendClientMessage(id, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "L-ai scos pe %s din functia de helper", GetName(id));

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

PlayerInfo[id][pHW] = 0;

UpdateVar(id, "HW", 0);

NewbieChat[playerid] = 0;

}

 

format(string, sizeof(string), "AdmCmd: %s i-a setat lui %s helper %d.", GetName(playerid),GetName(id),lvl);

if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string,4);

 

new query[128];

format(query,sizeof(query),"UPDATE users SET `Helper`='%d',`HelpedPlayers`='0' WHERE `ID`='%d'",lvl,PlayerInfo[id][pSQLID]);

mysql_query(SQL,query);

return 1;

}

Link to comment
Share on other sites

if(adminlevel >= 1) format(query,sizeof(query),"UPDATE users SET `Admin`='%d', `Security`='%s',`HelpedPlayers`='0' WHERE `ID`='%d'",PlayerInfo[id][pAdmin], MD5_Hash, PlayerInfo[id][pSQLID]);

Functia MD5_Hash nu ai folosit-o corespunzator.

MD5_Hash(string);

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

asa trb sa fie?

 

if(adminlevel >= 1) format(query,sizeof(query),"UPDATE users SET `Admin`='%d', `Security`='%s',`HelpedPlayers`='0' WHERE `ID`='%d'",PlayerInfo[id][pAdmin],MD5_Hash(string);, PlayerInfo[id][pSQLID]);

string-ul trebuie sa fie cel pe care vrei sa il hasurezi, iar ";" nu are ce cauta acolo....

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

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...