Family Rank 0 help
#1

alright i am trying to make a rank 0 in the family system i added all the other stuff such as that you can set family rank 0 name but i now i need to when you invite the player in the family he gets rank 1 not 0 i dont know what to edit so the player gets rank 0 when he gets invited in the family here is some of the /adjust invite system


Quote:

}
GivePlayerCash(playerid, -50000);
GetPlayerPos(playerid, FamilyInfo[family][FamilySafe][0],FamilyInfo[family][FamilySafe][1],FamilyInfo[family][FamilySafe][2]);
FamilyInfo[family][FamilyCash] = 0;
FamilyInfo[family][FamilyMats] = 0;
FamilyInfo[family][FamilyPot] = 0;
FamilyInfo[family][FamilyCrack] = 0;
if(FamilyInfo[family][FamilyUSafe]) DestroyDynamicPickup(FamilyInfo[family][FamilyPickup]);
FamilyInfo[family][FamilyUSafe] = 1;
FamilyInfo[family][FamilyPickup] = CreateDynamicPickup(1239, 23, FamilyInfo[family][FamilySafe][0], FamilyInfo[family][FamilySafe][1], FamilyInfo[family][FamilySafe][2]);
SaveFamilies();
SendClientMessageEx(playerid, COLOR_WHITE, "You've adjusted your family's Safe.");
format(string, sizeof(string), "%s adjusted family %d's safe", GetPlayerNameEx(playerid), family+0);
Log("logs/family.log", string);
}
else if(strcmp(choice,"invite",true) == 0)
{
if(!strlen(opstring))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /adjust invite [playerid]");
return 1;
}
new giveplayerid = ReturnUser(opstring);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (PlayerInfo[giveplayerid][pFMember] == 255)
{
// No more of this shit, our system is not designed for this
/*if(PlayerInfo[giveplayerid][pLeader] == 2 || PlayerInfo[giveplayerid][pMember] == 2 && PlayerInfo[giveplayerid][pDivision] == 2)
{
if(PlayerInfo[giveplayerid][pGangWarn] >= 3)
{
SendClientMessageEx(playerid, COLOR_WHITE, "That player can not be invited. They are banned from being in a gang.");
return 1;
}
format(string, sizeof(string), "* You've invited %s to join '%s'.",GetPlayerNameEx(giveplayerid), FamilyInfo[family][FamilyName]);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has invited you to join '%s'. (type /accept family)",GetPlayerNameEx(playerid), FamilyInfo[family][FamilyName]);
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
InviteFaction[giveplayerid] = 0;
InviteOffer[giveplayerid] = playerid;
InviteFamily[giveplayerid] = family;
}*/
if(PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pMember] == 0)
{
if(PlayerInfo[giveplayerid][pGangWarn] >= 3)
{
SendClientMessageEx(playerid, COLOR_WHITE, "That player can not be invited. They are banned from being in a gang.");
return 1;
}
format(string, sizeof(string), "* You've invited %s to join '%s'.",GetPlayerNameEx(giveplayerid), FamilyInfo[family][FamilyName]);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has invited you to join '%s'. (type /accept family)",GetPlayerNameEx(playerid), FamilyInfo[family][FamilyName]);
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
InviteFaction[giveplayerid] = 0;
InviteOffer[giveplayerid] = playerid;
InviteFamily[giveplayerid] = family;
format(string, sizeof(string), "%s invited %s to family %d ", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), family+0);
Log("logs/family.log", string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "That player is already in a family/faction.");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "That player is already in a family/faction.");
}
return 1;
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
return 1;
}
}

Reply
#2

Anyone?
Reply
#3

I'm confused on what you're needing honestly.
You're needing the player to have rank 1 when joining?
Reply
#4

Alright when you invite a player into your family and he type /accept family then he gets rank 1 i wanna change that when he type /accept family then he gets rank 0
Reply
#5

Show your /accept family part.



-- This forum requires that you wait 240 seconds between posts. Please try again in 28 seconds.
Reply
#6

Go to Command: /accept - faction,

Inside you should see something like:
Код:
PlayerInfo[playerid]['rank variable'] = 1;
change it to this:

Код:
PlayerInfo[playerid]['Rank variable'] = 0;
and it should change..
Reply
#7

Pretty much what Brandon said.

Also, try indenting your code(s), cause it looks messy.
Reply
#8

Okay i found this
but its on /adjust uninvite section

Quote:

format(string, sizeof(string), "* You've kicked %s out of your family.",GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Family leader %s has kicked your out of the family.",GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFMember] = 255;
PlayerInfo[giveplayerid][pRank] = 0;
FamilyInfo[family][FamilyMembers] --;
SaveFamilies();
format(string, sizeof(string), "%s uninvited %s from family %d ", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), family+1);
Log("logs/family.log", string);
return 1;
}

Quote:

PlayerInfo[giveplayerid][pRank] = 0;

Reply
#9

Use

PlayerInfo[playerid][pRank] = 0;

when player /accepts family
Reply
#10

If you change the invite rank to rank 0 it will be set to no family rank. Because if you look at the /uninvite, It sets it to 0 so it will set to default when he gets invited.

Mixed up my words, what I am trying to say is.. if you change the invite rank to 0 it will keep it as default.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)