CheckPoint 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)
+--- Thread: CheckPoint Problem (
/showthread.php?tid=616608)
CheckPoint Problem -
StR_MaRy - 07.09.2016
hey guys i have a /find sistem and is working 90% perfect but i have only one small problem , when i use /find name/id i get a checkpoint for 1 sec on that player and 1 on sf same for 1 sec and it's repeating 1 sec here 1 sec there
this code is the problem , can some1 say if is a problem with this code?
Код HTML:
if(targetfind[i] >= 0 && UseFind[i] == 1)
{
new target;
target = targetfind[i];
if(BizzEntered[target] > -1)
{
new j;
j = BizzEntered[target];
SetPlayerCheckpoint(i,BizzInfo[j][bEntranceX], BizzInfo[j][bEntranceY], BizzInfo[j][bEntranceZ],4);
}
else if(HouseEntered[target] > -1)
{
new j;
j = HouseEntered[target];
SetPlayerCheckpoint(i,HouseInfo[j][hEntranceX],HouseInfo[j][hEntranceY],HouseInfo[j][hEntranceZ],4);
}
else
{
new Float: x1, Float: y1, Float: z1;
GetPlayerPos(target,x1,y1,z1);
SetPlayerCheckpoint(i,x1,y1,z1,4);
}
}
Re: CheckPoint Problem -
kelvinis - 07.09.2016
First of all, make sure the script is readable, use brackets and spaces like you're supposed to do.
Код HTML:
if(targetfind[i] >= 0 && UseFind[i] == 1)
{
new target;
target = targetfind[i];
if(BizzEntered[target] > -1)
{
new j;
j = BizzEntered[target];
SetPlayerCheckpoint(i,BizzInfo[j][bEntranceX], BizzInfo[j][bEntranceY], BizzInfo[j][bEntranceZ],4);
}
else if(HouseEntered[target] > -1)
{
new j;
j = HouseEntered[target];
SetPlayerCheckpoint(i,HouseInfo[j][hEntranceX],HouseInfo[j][hEntranceY],HouseInfo[j][hEntranceZ],4);
}
else
{
new Float: x1, Float: y1, Float: z1;
GetPlayerPos(target,x1,y1,z1);
SetPlayerCheckpoint(i,x1,y1,z1,4);
}
}
Second: Try to make a loop. And you should check if the 'HouseEntered[target]' is working.
Re: CheckPoint Problem -
StR_MaRy - 07.09.2016
nope didn't work