SA-MP Forums Archive
Little help, please! :) - 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: Little help, please! :) (/showthread.php?tid=115145)



Little help, please! :) - Guso - 22.12.2009

I'm having a problem with setting these three things into a command, could anybody help me?
It would be great! =)

These three =
if(PlayerInfo[playerid][pFaction] == 10)
if(PlayerInfo[playerid][pFaction] == 0)
if(PlayerInfo[playerid][pFaction] == 6)

What i want :
I want these three to get mixed into one sentence so i can easily create new /commands could anybody help with that ? I beg you, please

What i want it to look like.
Код:
	if(strcmp(cmd, "/hey", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  if(PlayerInfo[playerid][pFaction] == 10) if(PlayerInfo[playerid][pFaction] == 6) if(PlayerInfo[playerid][pFaction] == 0)



Re: Little help, please! :) - Correlli - 22.12.2009

pawn Код:
if(PlayerInfo[playerid][pFaction] == 10 || PlayerInfo[playerid][pFaction] == 0 || PlayerInfo[playerid][pFaction] == 6)
{
  // code.
}



Re: Little help, please! :) - Guso - 22.12.2009

Thanks