Help /clubinvite - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help /clubinvite (
/showthread.php?tid=381772)
Help /clubinvite -
Rapk1d - 30.09.2012
Hello , I have on my server a nfs club / nrg club . When I give / clubinvite to someone after it exits ( /q )when return , kboom ! He isn't a club member.. ?? What's the problem .
I wait the answer . Thanks verry much !
Sorry for my bad english.
Here's the code !
Код:
if(strcmp(cmd, "/clubinvite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if(PlayerInfo[playerid][pClubLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pClubMember] == 0)
{
if(PlayerInfo[playerid][pClubLeader] == 1)
{
ftext = "NFS Club";
}
else if(PlayerInfo[playerid][pClubLeader] == 2)
{
ftext = "NRG Club";
}
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pClubMember] = PlayerInfo[playerid][pClubLeader];
PlayerInfo[para1][pClubRank] = 1;
printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " You have Joined the %s, you were invited by Leader %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have Invited %s to join the %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team.");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command(club leaders only)!");
}
}
return 1;
}
Re: Help /clubinvite -
Mr.Anonymous - 30.09.2012
You need to save the player file.
Re: Help /clubinvite -
Face9000 - 30.09.2012
You have to save some variables in the player file.Somethings like this:
pClub[playerid] and set it to 1 when he's in a club.
Re: Help /clubinvite -
Rapk1d - 01.10.2012
Anyone can help me ? Say me what i need to do for works of /clubinvite ... i'm so newbie in the scripting .. i don't understand some expressions.
Re: Help /clubinvite -
Rapk1d - 01.10.2012
I triad all owned methods . and don't work ... what's the problem ,,, i try every solution i found but , no result !
Re: Help /clubinvite -
Rapk1d - 03.10.2012
up , please help.