PHP код:
if(strcmp(cmd, "/leader", true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_LEADERK, DIALOG_STYLE_LIST,"Leader","Invite\nUninvite\nRangs","Megnйz","Mйgse"); // 7cucckombу
}
PHP код:
if(strcmp(cmd, "/invite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
Msg(playerid, "/invite [Jбtйkos Neve / ID]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] == 0)
{
if(PlayerInfo[playerid][pLeader] < 1 || PlayerInfo[playerid][pLeader] > sizeof(Szervezetneve)) return 1;
if(FrakcioInfo[ PlayerInfo[playerid][pLeader] ][fTagokSzama] >= FrakcioInfo[ PlayerInfo[playerid][pLeader]][fLimit])
// return Msg(playerid, "A frakciу tele van!");
FrakcioInfo[ PlayerInfo[playerid][pLeader] ][fTagokSzama]++;
new szt = PlayerInfo[playerid][pLeader] - 1;
ChosenSkin[para1] = szt;
SetPlayerSkin(para1, Skinek[szt][0]);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 0;
printf("AdminParancs: %s has invited %s to join %s.", sendername, giveplayer, Szervezetneve[szt][0]);
format(string, sizeof(string), "Csatlakoztбl ide: %s", Szervezetneve[szt][0]);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Meghнvtad %s-t hozzбtok (%s)", giveplayer, Szervezetneve[szt][0]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GetPlayerPos(playerid, ChangePos[para1][0],ChangePos[para1][1],ChangePos[para1][2]);
ChangePos2[para1][0] = GetPlayerInterior(playerid);
ChangePos2[para1][1] = GetPlayerVirtualWorld(playerid);
SetPlayerInterior(para1,0);
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(para1, 0);
SelectChar[para1] = 255;
SelectCharID[para1] = PlayerInfo[para1][pMember];
SelectCharPlace[para1] = 1;
PlayerInfo[para1][pChar] = ChosenSkin[para1];
SendClientMessage(para1, COLOR_LIGHTRED, "* A kцvetkező skinйrt ird be 'next'");
SendClientMessage(para1, COLOR_LIGHTRED, "* Ha vйgeztйl нrd be, hogy 'done'.");
new queryx[128];
format(queryx, 128, "UPDATE %s SET Member='%d' WHERE ID='%d'", SQL_DB_Player, PlayerInfo[playerid][pLeader], SQLID(para1));
mysql_query(queryx);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " A jбtйkos mбr egy Szerverezet / Banda / Csalбd tagja!");
return 1;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Ezt a parancsot nem hasznбlhatod(csak leader)!");
}
}
return 1;
}