member becomes a leader?
#1

How can I do to be a leader transferred to the member organization and that the old leader to be expelled from the organization's need for gf mod. thanks


sry bed eng?
Reply
#2

What the fuck?
Reply
#3

Quote:
Originally Posted by Nemanja92
Посмотреть сообщение
How can I do to be a leader transferred to the member organization and that the old leader to be expelled from the organization's need for gf mod. thanks


sry bed eng?
I think he means this:
- How can I become leader of organisation
- How to remove someones leader status in organisation
- In GodFather RP Gamemode

My answer, I don't like/use/play GodFather so I can't help you
Reply
#4

Well.. From the time I used GF I assume to remember that there's a command called /makeleader?
Reply
#5

and /auninvite?
Reply
#6

I need the command for the particular leader to type and to transfer leadership to another member of the organization and that he be expelled from the organization, I hope you understand me: D
Reply
#7

I can't seem to remember how GF works, but I made a quick code that would probably do the job.
pawn Код:
if(strcmp(cmd, "/transferleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new give[32], newleader, oldleadername[MAX_PLAYER_NAME], newleadername[MAX_PLAYER_NAME];
        give = strtok(cmdtext, idx);
        newleader = ReturnUser(give);
       
        if(PlayerInfo[playerid][pLeader] == 0)
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You are not high enough ranked to perform this action.");
            return 1;
        }
        if(!strlen(give)
        {
            SendClientMessage(playerid, 0xAA3333AA, "USAGE: /transferleader (player)");
            return 1;
        }
        if(PlayerInfo[playerid][pLeader] != PlayerInfo[newleader][pMember])
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not in your faction!");
            return 1;
        }
        if(!IsPlayerConnected(newleader))
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not online");
            return 1;
        }
        new message[126];
        GetPlayerName(playerid, oldleadername, sizeof(oldleadername));
        GetPlayerName(newleader, newleadername, sizeof(newleadername));
       
        format(message, sizeof(message), "You have been given the leader rights for faction %d, by %s.", PlayerInfo[playerid][pLeader], oldleadername);
        SendClientMessage(newleader, 0x33CCFFAA, string);
       
        format(message, sizeof(message), "You gave your leader rights to %s.", newleadername);
        SendClientMessage(playerid, 0x33CCFFAA, string);
       
        PlayerInfo[giveplayer][pLeader] = PlayerInfo[playerid][pLeader];
        PlayerInfo[playerid][pLeader] = 0;
        PlayerInfo[playerid][pMember] = 0;
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by _rAped
Посмотреть сообщение
I can't seem to remember how GF works, but I made a quick code that would probably do the job.
pawn Код:
if(strcmp(cmd, "/transferleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new give[32], newleader, oldleadername[MAX_PLAYER_NAME], newleadername[MAX_PLAYER_NAME];
        give = strtok(cmdtext, idx);
        newleader = ReturnUser(give);
       
        if(PlayerInfo[playerid][pLeader] == 0)
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You are not high enough ranked to perform this action.");
            return 1;
        }
        if(!strlen(give)
        {
            SendClientMessage(playerid, 0xAA3333AA, "USAGE: /transferleader (player)");
            return 1;
        }
        if(PlayerInfo[playerid][pLeader] != PlayerInfo[newleader][pMember])
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not in your faction!");
            return 1;
        }
        if(!IsPlayerConnected(newleader))
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not online");
            return 1;
        }
        new message[126];
        GetPlayerName(playerid, oldleadername, sizeof(oldleadername));
        GetPlayerName(newleader, newleadername, sizeof(newleadername));
       
        format(message, sizeof(message), "You have been given the leader rights for faction %d, by %s.", PlayerInfo[playerid][pLeader], oldleadername);
        SendClientMessage(newleader, 0x33CCFFAA, string);
       
        format(message, sizeof(message), "You gave your leader rights to %s.", newleadername);
        SendClientMessage(playerid, 0x33CCFFAA, string);
       
        PlayerInfo[giveplayer][pLeader] = PlayerInfo[playerid][pLeader];
        PlayerInfo[playerid][pLeader] = 0;
        PlayerInfo[playerid][pMember] = 0;
    }
    return 1;
}
i have error whao fix it:

Quote:

C:\Documents and Settings\Nemanja\Desktop\New Folder (26)\GTARP\gamemodes\gtarp.pwn(27358 ) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Nemanja\Desktop\New Folder (26)\GTARP\gamemodes\gtarp.pwn(27382) : error 033: array must be indexed (variable "giveplayer")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

27357 if(!strlen(give)
27358 {
27359 SendClientMessage(playerid, 0xAA3333AA, "USAGE: /transferleader (player)");
27360 return 1;
27360 }

and

27382 PlayerInfo[giveplayer][pLeader] = PlayerInfo[playerid][pLeader];
27383 PlayerInfo[playerid][pLeader] = 0;
27384 PlayerInfo[playerid][pMember] = 0;

error for this lines

Reply
#9

Quote:
Originally Posted by Nemanja92
Посмотреть сообщение
i have error whao fix it:
Auch my bad. Try this:
pawn Код:
if(strcmp(cmd, "/transferleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new give[32], newleader, oldleadername[MAX_PLAYER_NAME], newleadername[MAX_PLAYER_NAME];
        give = strtok(cmdtext, idx);
        newleader = ReturnUser(give);
       
        if(PlayerInfo[playerid][pLeader] == 0)
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: You are not high enough ranked to perform this action.");
            return 1;
        }
        if(!strlen(give))
        {
            SendClientMessage(playerid, 0xAA3333AA, "USAGE: /transferleader (player)");
            return 1;
        }
        if(PlayerInfo[playerid][pLeader] != PlayerInfo[newleader][pMember])
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not in your faction!");
            return 1;
        }
        if(!IsPlayerConnected(newleader))
        {
            SendClientMessage(playerid, 0xAA3333AA, "ERROR: That player is not online");
            return 1;
        }
        new message[126];
        GetPlayerName(playerid, oldleadername, sizeof(oldleadername));
        GetPlayerName(newleader, newleadername, sizeof(newleadername));
       
        format(message, sizeof(message), "You have been given the leader rights for faction %d, by %s.", PlayerInfo[playerid][pLeader], oldleadername);
        SendClientMessage(newleader, 0x33CCFFAA, string);
       
        format(message, sizeof(message), "You gave your leader rights to %s.", newleadername);
        SendClientMessage(playerid, 0x33CCFFAA, string);
       
        PlayerInfo[newleader][pLeader] = PlayerInfo[playerid][pLeader];
        PlayerInfo[playerid][pLeader] = 0;
        PlayerInfo[playerid][pMember] = 0;
    }
    return 1;
}
Reply
#10

thank you works great, just that you may know what should I put them to replace the clothes: D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)