Need help with checkpoints.
#1

So everything working fine, but when i go on checkpoint 1 it shows me checkpoint 3.
So there is something missing. Please help me

Код:
new Ccp[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
	// Checkpoints
	{
	    Ccp[playerid] =1;
	    CreateDynamicCP(1038.1439,-1339.7784,13.7266, 1, 0, 0, 0, 50); // gun shop enter
	}
	{
	    Ccp[playerid] =2;
	    CreateDynamicCP(285.3838,-40.1943,1001.5156, 1, 0, 1, 0, 50); //gun shop exit
	}
	{
	    Ccp[playerid] =3;
	    CreateDynamicCP(296.5040,-38.1360,1001.5156, 1, 0, 1, 0, 50);
	}
	return 1;
}


public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(Ccp[playerid] ==1)
    {
		SetPlayerPos(playerid,288.2349,-38.5503,1001.5156);
		SetPlayerInterior(playerid,1);
    }
    if(Ccp[playerid] ==2)
    {
    	SetPlayerPos(playerid,1038.4999,-1336.6597,13.7266);
		SetPlayerInterior(playerid,0);
	}
	if(Ccp[playerid] ==3)
	{
	    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "hi","Buy","Cancel");
	}
}
Reply
#2

Can't see whats wrong in a quick look.
But you could also use "IsPlayerInRangeOfPoint
Reply
#3

Код:
new Checkpoint [MAX_PLAYERS];

public OnGameModeInit()
{
    // Checkpoints
    Checkpoint[0] = CreateDynamicCP(1038.1439,-1339.7784,13.7266, 1, 0, 0, 0, 50); // gun shop enter
    Checkpoint[1] = CreateDynamicCP(285.3838,-40.1943,1001.5156, 1, 0, 1, 0, 50); //gun shop exit
    Checkpoint[2] = CreateDynamicCP(296.5040,-38.1360,1001.5156, 1, 0, 1, 0, 50);
    return 1;
}


public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint[0])
    {
		SetPlayerPos(playerid,288.2349,-38.5503,1001.5156);
		SetPlayerInterior(playerid,1);
    }
    if(checkpointid == Checkpoint[1])
    {
    	SetPlayerPos(playerid,1038.4999,-1336.6597,13.7266);
		SetPlayerInterior(playerid,0);
	}
	if(checkpointid == Checkpoint[2])
	{
	    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "M4A1 $5,400\nAK47 $4,500\nSniper Rifle $8,000\nCountry Rifle $6,500\nSawnoff Shotgun $4,000\nCombat Shotgun $4,900\nShotgun $3,200\nMp5 $3,500\nTec9 $2,900\nMini-Uzi $3,700\nDesert Eagle $5,300\nPistol $1,400\nSilenced Pistol $1,500\nKatana $500\nChainsaw $750","Buy","Cancel");
	}
	return 1;
}
Now they are like this and same problem. First who connects to server they work well and second guy doesnt see markers.

E: Tried to put createdymanicp to OnPlayerSpawn, but same problem.
Reply
#4

I need help still, sorry double post... please quick.
Reply
#5

pawn Код:
new Checkpoint [MAX_PLAYERS] [3];

public OnPlayerConnect(playerid)
{
    Checkpoint [playerid] [0] = CreateDynamicCP(1038.1439,-1339.7784,13.7266, 1, 0, 0, 0, 50); // gun shop enter
    Checkpoint [playerid] [1] = CreateDynamicCP(285.3838,-40.1943,1001.5156, 1, 0, 1, 0, 50); //gun shop exit
    Checkpoint [playerid] [2] = CreateDynamicCP(296.5040,-38.1360,1001.5156, 1, 0, 1, 0, 50);
    return 1;
}
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint [playerid] [0])
    {
        SetPlayerPos(playerid,288.2349,-38.5503,1001.5156);
        SetPlayerInterior(playerid,1);
    }
    else if(checkpointid == Checkpoint [playerid] [1])
    {
        SetPlayerPos(playerid,1038.4999,-1336.6597,13.7266);
        SetPlayerInterior(playerid,0);
    }
    else if(checkpointid == Checkpoint [playerid] [2])
    {
        ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "M4A1 $5,400\nAK47 $4,500\nSniper Rifle $8,000\nCountry Rifle $6,500\nSawnoff Shotgun $4,000\nCombat Shotgun $4,900\nShotgun $3,200\nMp5 $3,500\nTec9 $2,900\nMini-Uzi $3,700\nDesert Eagle $5,300\nPistol $1,400\nSilenced Pistol $1,500\nKatana $500\nChainsaw $750","Buy","Cancel");
    }
    return 1;
}
Reply
#6

Wow, this is not possible still bugging. Same problem second player doesn't see markers.
If someone wanna check my script here it is. http://pastebin.com/FJszfzmT If you figure out what is missing please reply :/ thanks anyway.
Reply
#7

Bump. I still need help :S
Reply
#8

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)