Aww my little capture system aint working :'( - 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: Aww my little capture system aint working :'( (
/showthread.php?tid=167426)
Aww my little capture system aint working :'( -
Lorenc_ - 12.08.2010
I just made a Capture system but i got several problems. One is when the timer is finished it still aint destroyed (Like the timer keeps continuing to -1:99 which i dont want) and Secondly One main textdraw is being hidden. I'm not very sure whats wrong.
heres my code:
pawn Код:
forward BombCounterAtCP1();
public BombCounterAtCP1()
{
BombCountAtCP1 --;
new tmp[256];
TextDrawDestroy(Text:CCP1);
format(tmp, sizeof tmp, "~r~The bomb is exploding in:~y~~n~%s", TimeConvert(BombCountAtCP1)
CCP1 = TextDrawCreate(234.0, 361.0, tmp);
TextDrawSetShadow(Text:CCP1, 0);
TextDrawSetOutline(Text:CCP1, 1);
TextDrawShowForAll(Text:CCP1);
if (IsDefusedAtCP1) {
TextDrawDestroy(Text:CCP1);
}
else if (BombCountAtCP1 == 0) {
TextDrawDestroy(Text:CCP1);
}
}
Aww wtf is wrong

Help me out pls
Re: Aww my little capture system aint working :'( -
Hiddos - 12.08.2010
1) If 'BombCountAtCP1' is what checks the time left, you might use if(BombCountAtCP1 == 0) or something like that
2) AFAIK, you don't need to do TextDrawDestroy(Text:CCP1), correct me if I'm wrong
3) You're creating textdraw CCP1, but later it looks like you're destroying it:
pawn Код:
CCP1 = TextDrawCreate(234.0, 361.0, tmp);
if (IsDefusedAtCP1) {
TextDrawDestroy(Text:CCP1);
}
else if (BombCountAtCP1 == 0) {
TextDrawDestroy(Text:CCP1);
}
}
Can you do something with that?
Re: Aww my little capture system aint working :'( -
Lorenc_ - 12.08.2010
Quote:
Originally Posted by Hiddos
1) If 'BombCountAtCP1' is what checks the time left, you might use if(BombCountAtCP1 == 0) or something like that
2) AFAIK, you don't need to do TextDrawDestroy(Text:CCP1), correct me if I'm wrong
3) You're creating textdraw CCP1, but later it looks like you're destroying it:
pawn Код:
CCP1 = TextDrawCreate(234.0, 361.0, tmp); if (IsDefusedAtCP1) { TextDrawDestroy(Text:CCP1); } else if (BombCountAtCP1 == 0) { TextDrawDestroy(Text:CCP1); } }
Can you do something with that?
|
I tryed all your ways, none possibly worked.
Re: Aww my little capture system aint working :'( -
Donuts - 12.08.2010
When the variable 'BombCountAtCP1' reaches 0 you should destroy the timer.
pawn Код:
if(BombCountAtCP1 == 0) KillTimer(BombCountTimerID);
You also have an error here:
pawn Код:
format(tmp, sizeof tmp, "~r~The bomb is exploding in:~y~~n~%s", TimeConvert(BombCountAtCP1)
It should be:
pawn Код:
format(tmp, sizeof(tmp), "~r~The bomb is exploding in:~y~~n~%s", TimeConvert(BombCountAtCP1));
Re: Aww my little capture system aint working :'( -
Lorenc_ - 12.08.2010
Quote:
Originally Posted by Alexander_Varela
When the variable 'BombCountAtCP1' reaches 0 you should destroy the timer.
pawn Код:
if(BombCountAtCP1 == 0) KillTimer(BombCountTimerID);
You also have an error here:
pawn Код:
format(tmp, sizeof tmp, "~r~The bomb is exploding in:~y~~n~%s", TimeConvert(BombCountAtCP1)
It should be:
pawn Код:
format(tmp, sizeof(tmp), "~r~The bomb is exploding in:~y~~n~%s", TimeConvert(BombCountAtCP1));
|
Those 2 bottom one, Yeah i had it like that but maybe when i pasted it didnt do shit?
Ill try it after
Edit: still dont work.