23.11.2014, 08:47
Hello, as title said, I have a problem with /Invite, /Accept commands for Faction Leaders.
So, I have 2 factions, look here Faction Info Enums:
Then, I started scripting for factions, with /Invite Command !
Then, players are invited, by variable:
And I started command /Accept. But I don't know how to make..
+REP, of course.
I just wanna' only for 1 Faction, then I see model and I try make for 2 faction.. I don't know how to start.
I hope you understanded me.
So, I have 2 factions, look here Faction Info Enums:
pawn Code:
enum fInfo
{
LiderG,
MembruG,
LiderL,
MembruL
}
new FactionInfo[MAX_PLAYERS][fInfo];
new Invited[MAX_PLAYERS];
pawn Code:
CMD:invite(playerid, params[])
{
new ID;
new string[128];
new name[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(ID, pname, sizeof(pname));
if(FactionInfo[playerid][LiderG] >= 1)
{
if(sscanf(params,"u", ID)) return SendClientMessage(playerid,-1,"{FF0000}Folosire: {15FF00}/Invite [JucatorID]");
format(string, sizeof(string), "{FFCC33}Informatie: {15FF00}Ai fost invitat de {FF00000}%s {15FF00}in factiunea {0066CC}Groove Street!", name);
SCM(ID, -1, string);
format(string, sizeof(string), "{FFCC33}Informatie: {15FF00}Scrie {FF00000}/accept {15FF00}pentru a accepta!", name);
SCM(ID, -1, string);
format(string, sizeof(string), "{FFCC33}L-ai invitat pe {FF0000}%s {FFCC33}pentru a intra in factiunea ta!", pname);
SCM(playerid, -1, string);
Invited[ID] = 1;
}
else if(FactionInfo[playerid][LiderL] >= 1)
{
if(sscanf(params,"u", ID)) return SendClientMessage(playerid,-1,"{FF0000}Folosire: {15FF00}/Invite [JucatorID]");
format(string, sizeof(string), "{FFCC33}Informatie: {15FF00}Ai fost invitat de {FF00000}%s {15FF00}in factiunea {0066CC}Familia Leonte!", name);
SCM(ID, -1, string);
format(string, sizeof(string), "{FFCC33}Informatie: {15FF00}Scrie {FF00000}/accept {15FF00}pentru a accepta!", name);
SCM(ID, -1, string);
format(string, sizeof(string), "{FFCC33}L-ai invitat pe {FF0000}%s {FFCC33}pentru a intra in factiunea ta!", pname);
SCM(playerid, -1, string);
Invited[ID] = 1;
}
return 1;
}
pawn Code:
Invited[ID] = 1;
pawn Code:
CMD:accept(playerid, params[])
{
if(Invited[playerid] == 1)
{
// Code... Don't know. For First Faction...
}
return 1;
}
I just wanna' only for 1 Faction, then I see model and I try make for 2 faction.. I don't know how to start.
I hope you understanded me.