[SOLVED]Question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Question (
/showthread.php?tid=91906)
[SOLVED]Question -
Jakku - 17.08.2009
Hello. I just edited my script today, and now I have a problem.
If I have this in OnPlayerConnect
pawn Код:
if(player_op[playerid] == 1)
{
new kstring[128];
new playername[MAX_PLAYERS];
GetPlayerName(playerid, playername, sizeof(playername));
format(kstring, sizeof(kstring), "Welcome back %s. You are currently a VIP Member", playername);
SendClientMessage(playerid, COLOR_MAGENTA, kstring);
player_op[playerid] = 1;
return 0;
}
And player comes in and he successfully gets that message when he comes if he is VIP member. But then, the problem is: I also have this:
pawn Код:
if(orgleader[playerid] == 1)
{
new kstring[128];
format(kstring, sizeof(kstring), "You are an organization leader. Type /leaderhelp for leader commands");
SendClientMessage(playerid, COLOR_MAGENTA, kstring);
orgleader[playerid] = 1;
return 0;
}
He comes and if he is a VIP member and also a leader, he just gets VIP member message. How I can display both if someone is also VIP and organization leader? Is it possible?
Re: Question -
snoob - 17.08.2009
Quote:
Originally Posted by Jakku
Hello. I just edited my script today, and now I have a problem.
If I have this in OnPlayerConnect
pawn Код:
if(player_op[playerid] == 1) { new kstring[128]; new playername[MAX_PLAYERS]; GetPlayerName(playerid, playername, sizeof(playername)); format(kstring, sizeof(kstring), "Welcome back %s. You are currently a VIP Member", playername); SendClientMessage(playerid, COLOR_MAGENTA, kstring); player_op[playerid] = 1; return 0; }
And player comes in and he successfully gets that message when he comes if he is VIP member. But then, the problem is: I also have this:
pawn Код:
if(orgleader[playerid] == 1) { new kstring[128]; format(kstring, sizeof(kstring), "You are an organization leader. Type /leaderhelp for leader commands"); SendClientMessage(playerid, COLOR_MAGENTA, kstring); orgleader[playerid] = 1; return 0; }
He comes and if he is a VIP member and also a leader, he just gets VIP member message. How I can display both if someone is also VIP and organization leader? Is it possible?
|
when you use return it stop the fuction execution, try removing those return 0; or just the first one.
Re: Question -
Jakku - 17.08.2009
Thanks