Jump to content
  • 0

Problema /uninvite


GiGiMuScHi

Question

Am o problema la /uninvite.daca un lider da uninvite si alt lider incearca sa il bage in factiune zice  "That player is in a Faction/Family/Punished!".Ma puteti ajta?

Uitati si comanda /uninvite:

//----------------------------------[uNINVITE]------------------------------------------------

if(strcmp(cmd, "/uninvite", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "COMANDA: /uninvite [1 with Fpunish/0 without Fpunish] [playerid/PartOfName]");

return 1;

}

new x_nr;

new para1;

x_nr = strvalEx(tmp);

tmp = strtok(cmdtext, idx);

para1 = ReturnUser(tmp);

  if(x_nr == 0)

{

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "Comanda: /uninvite 0 [playerid/PartOfName]");

return 1;

}

if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pAdmin] >= 5 )

{

    if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

    if (PlayerInfo[para1][pMember] > 0 && ((PlayerInfo[para1][pMember] == PlayerInfo[playerid][pLeader]) || (PlayerInfo[playerid][pAdmin] >= 5)))

    {

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

printf("AdmCmd: %s has uninvited %s.", sendername, giveplayer);

format(string, sizeof(string), "* You have been kicked from a Family / Police Force, by Leader %s.", sendername);

SendClientMessage(para1, COLOR_LIGHTRED, string);

SendClientMessage(para1, COLOR_LIGHTBLUE, "* You are now a Civilian again.");

                gTeam[para1] = 3;

PlayerInfo[para1][pTeam] = 3;

PlayerInfo[para1][pMember] = 0;

PlayerInfo[para1][pRank] = 0;

PlayerInfo[para1][pFwarn] = 0;

PlayerInfo[para1][pChar] = 0;

PlayerInfo[para1][pPunish] = 0;

new rand = random(sizeof(CIV));

SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);

PlayerInfo[para1][pModel] = CIV[rand];

MedicBill[para1] = 0;

SpawnPlayer(para1);

format(string, sizeof(string), "  You have kicked %s from his Family / Police Force.", giveplayer);

SendClientMessage(playerid, COLOR_LIGHTRED, string);

}

else

{

    format(string, sizeof(string), "%s isn't in your faction.You cannot uninvite him.", giveplayer);

SendClientMessage(playerid, COLOR_GRAD1, string);

}

}

}//not connected

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "You are not autorized to use this command!");

}

}

if(x_nr == 1)

{

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "Comanda: /uninvite 1 [playerid/PartOfName]");

return 1;

}

if (PlayerInfo[playerid][pLeader] >= 1 || PlayerInfo[playerid][pAdmin] >= 5 )

{

    if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

    if (PlayerInfo[para1][pMember] > 0)

    {

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

printf("AdmCmd: %s has uninvited %s.", sendername, giveplayer);

format(string, sizeof(string), "* You have been kicked from a Family / Police Force, by Leader %s.", sendername);

SendClientMessage(para1, COLOR_LIGHTBLUE, string);

SendClientMessage(para1, COLOR_LIGHTBLUE, "* You are now a Civilian again.");

                gTeam[para1] = 3;

PlayerInfo[para1][pTeam] = 3;

PlayerInfo[para1][pMember] = 0;

PlayerInfo[para1][pRank] = 0;

PlayerInfo[para1][pFwarn] = 0;

PlayerInfo[para1][pChar] = 0;

PlayerInfo[para1][pPunish] = 20;

new rand = random(sizeof(CIV));

SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);

PlayerInfo[para1][pModel] = CIV[rand];

MedicBill[para1] = 0;

SpawnPlayer(para1);

format(string, sizeof(string), "  You have kicked %s from his Family / Police Force.", giveplayer);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

}

}

}//not connected

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "You are not autorized to use this command!!");

}

}

}

return 1;

}

//----------------------------------[uNINVITE]------------------------------------------------

Respecta Si Vei Fi Respectat !!!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.