SA-MP Forums Archive
Sometan new - 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: Sometan new (/showthread.php?tid=162335)



Sometan new - willsuckformoney - 23.07.2010

ok first at top under #include <a_samp>

pawn Код:
new CheckPoint[MAX_PLAYERS];
new MCP;
then under onplayerspawn
pawn Код:
MCP = SetPlayerCheckpoint(playerid, -329.5715, 1536.9965, 76.6117, 4.0);
then onplayerentercheckpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckPoint == MCP)
    {
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
        return 1;
    }
    return 0;
}
and these errors

Код:
C:\Users\Charlie\Desktop\server 2\gamemodes\BEvA51B.pwn(1134) : error 033: array must be indexed (variable "CheckPoint")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Someone helps?? if not this way then is there another way to make multi-checkpoints without streamers?

EDIT: Line 1134

pawn Код:
if(CheckPoint == MCP)



Re: Sometan new - iggy1 - 23.07.2010

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckPoint[playerid] == MCP)
    {
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
        return 1;
    }
    return 0;
}



Re: Sometan new - Kar - 23.07.2010

new MCP[256];


Re: Sometan new - DarkClone - 23.07.2010

new CheckPoint; instead of new CheckPoint[MAX_PLAYERS];

It worked without errors, and add return 1; at the bottom of onplayerentercheckpoint

I don't know much about muti-checkpoints, sorry if this doesn't help.


Re: Sometan new - willsuckformoney - 23.07.2010

ok first no warning no errors
second kar the 265 wasnt needed
third when i enter checkpoint ingame nothin happens

EDIT: Dark that just brought moar errors


Re: Sometan new - iggy1 - 23.07.2010

Im not called first lolz hope u fix ur problem m8.

Edit: I use a steamer so can't help sorry


Re: Sometan new - willsuckformoney - 23.07.2010

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Im not called first lolz hope u fix ur problem m8.

Edit: I use a steamer so can't help sorry
lol moo! and i may stream soon lol


Re: Sometan new - Kar - 23.07.2010

start back over. what line is 1134... SPECIFIy the lines pl0x


Re: Sometan new - willsuckformoney - 23.07.2010

ok everything since we added

at top
pawn Код:
new CheckPoint[MAX_PLAYERS];
new MCP;
OnPlayerSpawn
pawn Код:
MCP = SetPlayerCheckpoint(playerid, -329.5715, 1536.9965, 76.6117, 4.0);
OnPlayerEnterCheckpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckPoint[playerid] == MCP)
    {
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
        return 1;
    }
    return 0;
}
NO ERRORS JUST NOTHING HAPPENS WHEN ENTERS CP


Re: Sometan new - DarkClone - 23.07.2010

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(CheckPoint[playerid] == MCP)
    {
        SetPlayerInterior(playerid, 6);
        SetPlayerPos(playerid,316.524993,-167.706985,999.593750);
        return 1;
    }
    return 1; // You returned 0...
}