Need some help
#1

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

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

Okay Nvm
Reply
#4

Thanks
Reply
#5

You're welcome.

BUT next time show us the error, too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)