Szisztok.Az lenne a problemam hogy mikor beirom /makeleader akkor elojon hogy valassz funkciot de mikor beirom a jatekos id-jet es a leader idet akkor meg semmit sem csinal,semmit sem ir ki es nem is rakja be leadernek.Itt a parancs:
if(strcmp(cmd, \"/makeleader\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
Msg(playerid, \"=================[Leader Osztás]=================\");
Msg(playerid, \"{0285FF}HASZNÁLAT:{FFFFFF} /makeleader [JátékosID/Név] [szám(1-20)]\");
Msg(playerid, \"ID-k: /factionlist\");
Msg(playerid,\"=================[Leader Osztás]=================\");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(/*level > 20 || level < 0*/level > sizeof(Skinek))return SendClientMessage(playerid, COLOR_GREY, \" Nincs ilyen leaderes meló!\");
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, MAX_PLAYER_NAME);
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
PlayerInfo[para1][pLeader] = level;
PlayerInfo[para1][pMember] = level;
PlayerInfo[para1][pFMember] = 255;
if(level != 0)
{
format(string, sizeof(string), \"Kineveztek egy csapat vezetõjévé!\", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), \"Kinevezted %s-t leaderré!\", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), \"<< Admin %s kinevezte %s-t leaderré! Frakció ID: %d >>\", sendername, giveplayer, level);
ABroadCast(COLOR_LIGHTRED, string, 1);
}
else
{
format(string, sizeof(string), \"Elvették a leaderséged!\");
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), \"Elvetted %s leaderségét!\", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), \"<< Admin %s elvette %s leaderségét! >>\", sendername, giveplayer);
ABroadCast(COLOR_LIGHTRED, string, 1);
return 1;
}
if(level == 0)
PlayerInfo[para1][pMunkaSkin] = PlayerInfo[para1][pSimaSkin];
if(!IsHitman(playerid))
PlayerInfo[para1][pMunkaSkin] = LeaderSkinek[level][PlayerInfo[playerid][pNem] - 1];
else
PlayerInfo[para1][pMunkaSkin] = PlayerInfo[para1][pSimaSkin];
if(PlayerInfo[para1][pMunkaSkin] > 0 && OnDuty[para1] != NINCS || PlayerInfo[para1][pMunkaSkin] > 0 && !LegalisSzervezetTagja(para1) && !IsHitman(para1))
SetPlayerSkin(para1, PlayerInfo[para1][pMunkaSkin]);
else
SetPlayerSkin(para1, PlayerInfo[para1][pSimaSkin]);
}
}//not connected
}
}
return 1;
}