Need some help here.
#1

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
Reply
#2

on connnect TextDrawShowForAll(Textdraw;

*edit
lol
Код:
on connnect TextDrawShowForAll(Textdraw8);
Reply
#3

May i ask u why do u want me to put it on OnPlayerConnect?
Reply
#4

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?
Reply
#5

But when the timer starts its suppose to show the TD to everyone
yer 1 day = 1 hour
Reply
#6

so you may have to wait upto 1 hor to see the td

and
pawn Код:
SetTimer("WalkingWeps", NextDay, true);
true to make it repeat
Reply
#7

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..
Reply
#8

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);
}
Reply
#9

Dont worrie i fixed it thanks for helpin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)