SA-MP Forums Archive
Noob 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: Noob question :$ (/showthread.php?tid=71392)



Noob question :$ - Shellegg - 31.03.2009

Damn anyone can tell me how to set raange on a gate? -.-

pawn Code:
if(strcmp(cmd, "/openpd1", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
            if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
            {
              //if(PlayerToPoint(10.0, playerid,246.3236,72.0459,1003.6406)
              {
                    MoveObject(pddoor1, 244.0578,72.4314,1002.5406, 3.5000);
                    MoveObject(pddoor2, 247.1478,72.4314,1002.5406, 3.5000);
                    return 1;
                }
            }
            return 1;
        }
        return 1;
    }



Re: Noob question :$ - ICECOLDKILLAK8 - 31.03.2009

Use PlayerToPoint


Re: Noob question :$ - Shellegg - 31.03.2009

playertopint is there lol, but its // because it give sme error


Re: Noob question :$ - Pyrokid - 31.03.2009

What error?


Re: Noob question :$ - Shellegg - 31.03.2009

C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Hillsbrad Foothills\gamemodes\crp.pwn(5962) : error 001: expected token: ")", but found "{"



Re: Noob question :$ - Exceed - 01.04.2009

lol
if(PlayerToPoint(10.0, playerid,246.3236,72.0459,1003.6406))


Re: Noob question :$ - Shellegg - 01.04.2009

WTF?

Lol, damn, i fell so imbaraced, lock and delete!!!!!

EDIT: or not..

Now i get this errors on the same line.

pawn Code:
C:\Documents and Settings\Proprietбrio\Ambiente de trabalho\Hillsbrad Foothills\gamemodes\crp.pwn(6012) : error 036: empty statement



Re: Noob question :$ - Kinetic - 01.04.2009

dont put brackets in brackets

pawn Code:
DynamicFactions[PlayerInfo[playerid][pFaction]][fType]
make it like this
pawn Code:
new variable = PlayerInfo[playerid][pFaction]
            if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[variable][fType] == 1)



Re: Noob question :$ - RobertGraham - 01.04.2009

Automatic Gates