[SOLVED]Question
#1

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?
Reply
#2

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.
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)