Код:
if(strcmp(cmd, "/test", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerData[playerid][pAdmin] >= 0)
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{ffffff}We are sorry , but you are not logged in to use this comand!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/test*dyavoloJustMe*");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(EsteManager(playerid))
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new day,month,year;
getdate(day,month,year);
new hour,minute,second;
gettime(hour,minute,second);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "You have been promoted to admin level %d de catre %s.", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You promote %s at admin level %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s promoted %s at admin level %d.", sendername, giveplayer,level);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
format(string, sizeof(string), "%s promoted %s at admin level %d (%d-%d-%d), (%d:%d:%d)", sendername, giveplayer,level,day,month,year,hour,minute,second);
HackLog(string);
new query[128];
PlayerData[para1][pAdmin] = level;
format(query, sizeof(query), "UPDATE players SET AdminLevel='%d' WHERE id=%d", PlayerData[para1][pAdmin], PlayerData[para1][pSQLID]);
mysql_query(query);
}
}
}
}
}
return 1;
}
sorry to say that . cannot understand your problem
don't work really i dunno why some time give me admin some time dont show nothing and with dubuging how to do? what to do?