23.11.2017, 12:45
My repfam system is kinda bugged, when 4/5 turn it on in the same time it's get turn off from some players why?
all codes of it:
Also im using this codes when using this cmds /makeleader , /quitgang , /switchfam , /fcreate , OnPlayerDisconnect , OnPlayerConnect , OnPlayerLoad
What the problem? wtf
all codes of it:
Код:
new Text3D:fRepfamtext[MAX_PLAYERS]; new fRepfam[MAX_PLAYERS]; new fRepfamTimer[MAX_PLAYERS];
Код:
CMD:repfam(playerid, params[])
{
new string[300];
if(gettime() < fRepfamTimer[playerid])
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You have to wait 2 minutes to take your bandana off");
return 1;
}
if(PlayerInfo[playerid][pFMember] != INVALID_FAMILY_ID)
{
if(fRepfam[playerid] == 1)
{
SendClientMessageEx(playerid, COLOR_GREEN, "You are not representing your repfam anymore.");
Delete3DTextLabel(fRepfamtext[playerid]);
//Delete3DTextLabel(fRepfamtext[playerid][fRepfam]);
fRepfam[playerid] = 0;
}
else
{
new fam = PlayerInfo[playerid][pFMember];
fRepfamTimer[playerid] = gettime()+120;
SendClientMessageEx(playerid, COLOR_GREEN, "You are now representing the repfam.");
format(string, sizeof(string), "{%s}%s", Family_NumToDialogHex(FamilyInfo[fam][FamilyColor]), FamilyInfo[fam][FamilyName]);
fRepfam[playerid] = 1;
fRepfamtext[playerid] = Create3DTextLabel(string, 0xFFFFFFFF, 0, 0, 0, 25, 0, 1);
Attach3DTextLabelToPlayer(fRepfamtext[playerid], playerid, 0.0, 0.0, 0.0);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not part of a gang.");
}
return 1;
}
Код:
Delete3DTextLabel(fRepfamtext[playerid]); fRepfam[playerid] = 0; fRepfamTimer[playerid] = gettime()+0;



