SA-MP Forums Archive
Need some help - 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: Need some help (/showthread.php?tid=166728)



Need some help - DragonBlaster50 - 09.08.2010

hey guys, i made a VERY small code, but im already getting an error, could someone correct the small mistake i made?:

Код:
	if(strcmp(cmdtext, "/buyweapon", true) == 0 || strcmp(cmdtext, "/buygun", true) == 0)
	{
	if(GetPlayerInterior == 1)
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 296.2903,-37.9902,1001.5156))
	{
	
	}
	return 1;
	}
Thanks!


Re: Need some help - [HUN]Jaki - 09.08.2010

What the...?

There are two ways to use if():

if () OnlyOneThingYouCanDoHere();
OR
if (){
//You can do here anything you want, as long as you want.
}

pawn Код:
if(strcmp(cmdtext, "/buyweapon", true) == 0 || strcmp(cmdtext, "/buygun", true) == 0)
{
  if(GetPlayerInterior == 1){
     if(IsPlayerInRangeOfPoint(playerid, 10.0, 296.2903,-37.9902,1001.5156))
    {
     
    }
  }
  return 1;
}
Or "if(GetPlayerInterior==1 && IsPlayerInRangeOfPoint(playerid, 10.0, 296.2903,-37.9902,1001.5156)){}" is easier.


Re: Need some help - Scarface~ - 09.08.2010

Okay Nvm


Re: Need some help - DragonBlaster50 - 09.08.2010

Thanks


Re: Need some help - [HUN]Jaki - 09.08.2010

You're welcome.

BUT next time show us the error, too.