22.07.2013, 10:25
So, this is my first time scripting since my 2 year break from anything SA-MP related. So please,
bear with me.
I have these checkpoints created:
So far, all of them are visible and I could actually see them. But the funny thing is,
only 1 of them is working and I don't know why. Here's my code on the OnPlayerEnterDynamicCP:
Only the SFBank checkpoint is working and the others won't work.
I'm kind of confused because I know I did nothing wrong.
I'm using Incognito's Streamer by the way. And I haven't had any
sleep so I'm really pissed and confused on why it isn't working. Again,
bear with me.
bear with me.
I have these checkpoints created:
pawn Код:
new LSBank, SFBank, LVBank, InsideBankLS, InsideBankFuncLS, InsideBankSF, InsideBankFuncSF, InsideBankLV, InsideBankFuncLV;
pawn Код:
public OnGameModeInit()
{
LSBank = CreateDynamicCP(1498.50, -1581.40, 12.55, 1, -1, -1, -1, 30.0);
CreateDynamicMapIcon(1498.50, -1581.40, 12.55, 52, 0, -1, -1, -1, 400.0);
SFBank = CreateDynamicCP(-1493.24, 920.19, 6.19, 1, -1, -1, -1, 30.0);
CreateDynamicMapIcon(-1493.24, 920.19, 6.19, 52, 0, -1, -1, -1, 400.0);
LVBank = CreateDynamicCP(2446.74, 2376.32, 11.16, 1, -1, -1, -1, 30.0);
CreateDynamicMapIcon(2446.74, 2376.32, 11.16, 52, 0, -1, -1, -1, 400.0);
InsideBankLS = CreateDynamicCP(2306.09, -16.14, 25.75, 1, 1, -1, -1, 5.0);
InsideBankFuncLS = CreateDynamicCP(2309.63, -2.22, 25.74, 1, 1, -1, -1, 15.0);
InsideBankSF = CreateDynamicCP(2306.09, -16.14, 25.75, 1, 2, -1, -1, 5.0);
InsideBankFuncSF = CreateDynamicCP(2309.63, -2.22, 25.74, 1, 2, -1, -1, 15.0);
InsideBankLV = CreateDynamicCP(2306.09, -16.14, 25.75, 1, 3, -1, -1, 5.0);
InsideBankFuncLV = CreateDynamicCP(2309.63, -2.22, 25.74, 1, 3, -1, -1, 15.0);
return 1;
}
only 1 of them is working and I don't know why. Here's my code on the OnPlayerEnterDynamicCP:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == LSBank)
{
SetPlayerPos(playerid, 2308.52, -16.09, 26.75);
SetPlayerVirtualWorld(playerid, 1);
}
else if(checkpointid == SFBank)
{
SetPlayerPos(playerid, 2308.52, -16.09, 26.75);
SetPlayerVirtualWorld(playerid, 2);
}
else if(checkpointid == LVBank)
{
SetPlayerPos(playerid, 2308.52, -16.09, 26.75);
SetPlayerVirtualWorld(playerid, 3);
}
else if(checkpointid == InsideBankLS)
{
SetPlayerPos(playerid, 1498.50, -1583.40, 12.55);
SetPlayerVirtualWorld(playerid, 0);
}
else if(checkpointid == InsideBankSF)
{
SetPlayerPos(playerid, -1496.24, 920.19, 6.19);
SetPlayerVirtualWorld(playerid, 0);
}
else if(checkpointid == InsideBankLV)
{
SetPlayerPos(playerid, 2445.74, 2376.32, 11.16);
SetPlayerVirtualWorld(playerid, 0);
}
return 1;
}
I'm kind of confused because I know I did nothing wrong.
I'm using Incognito's Streamer by the way. And I haven't had any
sleep so I'm really pissed and confused on why it isn't working. Again,
bear with me.