Advertisements
#1

i have advertisements in my server, but 2 advertisements show up on 1 time, the timer is 30000
Reply
#2

A snippet of your code might help.
Reply
#3

Quote:
Originally Posted by Stigg
Посмотреть сообщение
A snippet of your code might help.
pawn Код:
adtimer = SetTimer("Advertisements", 300000, 1);
Reply
#4

Show the things that are inside the timer, the callback
Reply
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
Show the things that are inside the timer, the callback
pawn Код:
public Advertisements()
{

    new dice = random(8)+1;
    ad = dice;
    Advertisements2();

    return 1;
}

public Advertisements2()
{

    new string[255];
    new ftext[255];
    if(ad == 1) { ftext = "/help."; }
    else if(ad == 2) { ftext = "shop."; }
    else if(ad == 3) { ftext = ":D:D:D"; }
    else if(ad == 4) { ftext = "ohd."; }
    else if(ad == 5) { ftext = "Advert"; }
    else if(ad == 6) { ftext = "wewq"; }
    else if(ad == 7) { ftext = "adad"; }
    else if(ad == 8) { ftext = " faf"; }
    format(string, sizeof(string), "%s", ftext);
    SendClientMessageToAll(COLOR_LIGHTBLUE, string);

    return 1;
}
not sure but i think it happens when there are more than 2 players ingame
Reply
#6

Use random() instead.
Reply
#7

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
Use random() instead.
pawn Код:
L:\San Andreas Gangwars\SAGW\gamemodes\SAGW.pwn(3098) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#8

Please Help. It Shows up 2 At 1 time when there are more than 2 players.
Reply
#9

When he mean random() You have to put a number in there, in your case 8, because there are 8 things you want to show. Example : random(8)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)