Need some help here. - 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: Need some help here. (
/showthread.php?tid=162089)
Need some help here. -
Lorenc_ - 22.07.2010
Hello, I have some problem with my wepons day system. When i disconnect from the server and then rejoin my server the textdraw dosent show anymore.
Heres my code:
pawn Код:
SetTimer("RunningWeps", StartWepDay, false);
^ Ongamemodinit
timers:
pawn Код:
public RunningWeps()
{
SetTimer("WalkingWeps", NextDay, false);
IsRunningWeps = 1;
IsWalkingWeps = 0;
TextDrawSetString(Textdraw8, "Running Weapons Day");
TextDrawShowForAll(Textdraw8);
}
public WalkingWeps()
{
SetTimer("RunningWeps", NextDay, false);
IsRunningWeps = 0;
IsWalkingWeps = 1;
TextDrawSetString(Textdraw8, "Walking Weapons Day");
TextDrawShowForAll(Textdraw8);
}
What should i add on onplayerdisconnect to make this work? Or is there any other way? Help
Re: Need some help here. -
(SF)Noobanatior - 22.07.2010
on connnect TextDrawShowForAll(Textdraw

;
*edit
lol
Код:
on connnect TextDrawShowForAll(Textdraw8);
Re: Need some help here. -
Lorenc_ - 22.07.2010
May i ask u why do u want me to put it on OnPlayerConnect?
Re: Need some help here. -
(SF)Noobanatior - 22.07.2010
so it shows that text draw for the joining player when they connect without the timer having to run coz i guess the timer only runs once a day?
Re: Need some help here. -
Lorenc_ - 22.07.2010
But when the timer starts its suppose to show the TD to everyone
yer 1 day = 1 hour
Re: Need some help here. -
(SF)Noobanatior - 22.07.2010
so you may have to wait upto 1 hor to see the td
and
pawn Код:
SetTimer("WalkingWeps", NextDay, true);
true to make it repeat
Re: Need some help here. -
Lorenc_ - 22.07.2010
Quote:
Originally Posted by (SF)Noobanatior
so you may have to wait upto 1 hor to see the td
and
pawn Код:
SetTimer("WalkingWeps", NextDay, true);
true to make it repeat
|
No i dont, because when the timer is started it Just shows the textdraw then updates in the next hour.
btw i tried ur code for onplayer connect and still it didnt work..
Re: Need some help here. -
(SF)Noobanatior - 22.07.2010
how about like this then
pawn Код:
//golbal var
new bool:RunningDay;
//under gameinit
SetTimer("DayWeps", NextDay, true);
public DayWeps(){
if(RunningDay == true){
RunningDay = false;
IsRunningWeps = 1;
IsWalkingWeps = 0;
TextDrawSetString(Textdraw8, "Running Weapons Day");
else if(RunningDay == false){
RunningDay = true;
IsRunningWeps = 0;
IsWalkingWeps = 1;
TextDrawSetString(Textdraw8, "Walking Weapons Day");
}
TextDrawShowForAll(Textdraw8);
}
Re: Need some help here. -
Lorenc_ - 22.07.2010
Dont worrie i fixed it

thanks for helpin