hi i need some help i have a pice of code that lets me give someone an admin but it stays only on level 1 so could someone help because i need it to be able to do up to 5 so if someone could help that would be great
Код:
if (strcmp(cmd, "/giveadmin", true) ==0 )
{
new giveplayerid;
if(PlayerInfo[playerid][Admin] >= 5)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /giveadmin[playerid] ");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
PlayerInfo[giveplayerid][Admin] = 1;
SendClientMessage(giveplayerid, COLOR_GRAD1, "You Have been Given Admin");
}
else
{
SendClientMessage(giveplayerid, COLOR_GRAD1, "Player Is Not On The Sever");
}
}
}
else
{
SendClientMessage(giveplayerid, COLOR_GRAD1, "You Are Not Admin");
}
return 1;
}