SetPlayerCheckpointEx Problem - 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: SetPlayerCheckpointEx Problem (
/showthread.php?tid=271548)
SetPlayerCheckpointEx Problem -
EdeniaGaming - 24.07.2011
Ok so my problem is I noticed it, None of the SetPlayerCheckpointEx functions are working... I'll take my arms dealer job for example. It says I have bought the materials but... The Checkpoint does not appear. What is causeing this checkpoint not to appear ?
Код:
stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:range)
{
if(iActiveCheckpoint[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You already have a active checkpoint, you cannot do that at this time.");
return 0;
}
else
{
SetPlayerCheckpointEx(playerid, x, y, z, range);
iActiveCheckpoint[playerid] = 1;
return 1;
}
}
stock DisablePlayerCheckpointEx(playerid)
{
iActiveCheckpoint[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
Код:
if (dialogid == DBUYMATS2) // Mats Dealer - Route 2
{
if (response == 1) // OK
{
if(IsNull(inputtext))
{
ShowMatsMenu(playerid, 2);
return 1;
}
else if(strval(inputtext) <= 0)
{
ShowMatsMenu(playerid, 2);
return 1;
}
else
{
new price = strval(inputtext) * 125;
if(GetPlayerMoney(playerid) > price)
{
if(MatsRoute[playerid] == 0 || MatsRoute[playerid] == 2)
{
if(MatsHolding[playerid] <= 20)
{
if(iActiveCheckpoint[playerid] == 1 && MatsRoute[playerid] != 2)
{
SendClientMessage(playerid,COLOR_GREY, "You already have a active checkpoint, you cannot do this at this time.");
return 1;
}
else
{
if(strval(inputtext) + MatsHolding[playerid] <= 20)
{
format(string, sizeof(string), "* You bought %d Material Packages, for %s.", strval(inputtext), ConvertToMoney(price));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid, -price);
PlayerInfo[playerid][pCash] -= price;
MatsHolding[playerid] += strval(inputtext);
MatsRoute[playerid] = 2;
DisablePlayerCheckpointEx(playerid);
SetPlayerCheckpointEx(playerid,2585.4438,-2215.6223,-0.2188,10.0);
}
else
{
ShowMatsMenu(playerid, 2);
}
}
}
}
}
}
}
else // CANCEL
{
}
return 1;
}
Re: SetPlayerCheckpointEx Problem -
EdeniaGaming - 24.07.2011
Anyone ?
Re : SetPlayerCheckpointEx Problem -
Soumi - 24.07.2011
I had the same problem, i just used SetPlayerCheckpoint and its working well