Faction Ranks (read) -
MaDsON - 14.01.2014
Read my last post. (2nd page)
Re: Faction Ranks (read) -
Aira - 15.01.2014
Try moving the " facrank = PlayerInfo[playerid][pRank] " somewhere outside the stock?
If I can remember well, That's how it should be, If it's not that, Sorry.. Just came back to samp after a year and trying to help.
Re: Faction Ranks (read) -
maramizo - 15.01.2014
pawn Код:
new faction = PlayerInfo[playerid][pMember], facrank = PlayerInfo[playerid][pRank];
There.
Re: Faction Ranks (read) -
Kane - 15.01.2014
..Never mind my reply
Re: Faction Ranks (read) -
Scaleta - 15.01.2014
Semicolon, semicolon, semicolon!
Also, it makes no sense to use a switch statement, and then not again.
http://puu.sh/6lid9/2a57eb261e.png - These can be put in a switch.
Re: Faction Ranks (read) -
MaDsON - 15.01.2014
Код:
C:\Users\***\Desktop\NB\Madson Gaming (OFFICIAL SERVER)\gamemodes\KG.pwn(57917) : error 017: undefined symbol "facrank"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
CMD:invite(playerid, params[])
{
if (PlayerInfo[playerid][pLeader] >= 1)
{
new string[128], ftext[50], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /invite [playerid]");
if(IsPlayerConnected(giveplayerid))
{
if (PlayerInfo[giveplayerid][pLeader] == 0 && PlayerInfo[giveplayerid][pMember] == 0 && PlayerInfo[giveplayerid][pFMember] == 255)
{
if(PlayerInfo[playerid][pLeader] == 1) { ftext = "LSPD"; }
else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "FBI"; }
else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "DHS"; }
else if(Team_LSFMD(playerid)) { ftext = "LSFMD"; }
else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "Judicial System"; }
else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "The Government"; }
else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "SAST"; }
else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Hitman Agency"; }
else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "SANews"; }
else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "Taxi Cab Company"; }
else if(PlayerInfo[playerid][pLeader] == 11) { ftext = "National Guard"; }
else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "Tierra Robada"; }
else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "NOOSE"; }
else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "Mafia Brotherhood"; }
else { return 1; }
InviteOffer[giveplayerid] = playerid;
InviteFamily[giveplayerid] = 255;
InviteFaction[giveplayerid] = PlayerInfo[playerid][pLeader];
format(string, sizeof(string), "%s %s has offered you an invite to %s - type /accept faction.", facrank, GetPlayerNameEx(playerid), ftext);
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "You have offered %s an invite to %s.", GetPlayerNameEx(giveplayerid),ftext);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "The player you're trying to invite is already in another faction or family.");
return 1;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command - only leaders can do this.");
}
return 1;
}
Re: Faction Ranks (read) -
MaDsON - 15.01.2014
booop
Re: Faction Ranks (read) -
MaDsON - 15.01.2014
Bump 2x.
Re: Faction Ranks (read) -
cessil - 16.01.2014
if you create a new variable inside a stock it's only exists in that stock
https://sampwiki.blast.hk/wiki/Scripting_Basics#Scope
instead of using facrank in your command why not just use PlayerInfo[playerid][pRank] because that's what it is
Re: Faction Ranks (read) -
Mattakil - 16.01.2014
if I were you, i'd:
1) Not use the godfather script, or an edit of godfather, it's outdated.
2) Change the rank to a string, and make the command setrank [nameofrank], it's less of a pain in the ass in game that way