open.mp forum
[Pawn] Help Message all no working - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Help Message all no working (/showthread.php?tid=2485)



Help Message all no working - nbx2000 - 2023-11-14

Hello, can you help me with the message system in non-random order, it doesn't work well, it doesn't respect the time between texts.
ptask AnunciosChat[50000]()
{
ServerInfo[AnuncioTexto] ++;
if(ServerInfo[AnuncioTexto] == 27) ServerInfo[AnuncioTexto] = 1;
switch(ServerInfo[AnuncioTexto])
    {
    case 1: SendClientMessageToAllEx(COLOR_ROJO, "[-]Derby "COL_BLANCO"test1");
    case 2: SendClientMessageToAllEx(COLOR_NARANJA, "[DLF]Botz "COL_BLANCO""test2");
    case 3: SendClientMessageToAllEx(COLOR_NARANJA, "[DLF]Botz "COL_BLANCO"test3");
    case 4:
{
SendClientMessageToAllEx(-1, ""COL_AMARILLO"[-]CARRERA: "COL_BLANCO"Se ha inciado (Modo Carrera)"(/carreras)");
lrace = 1;
}
case 5:
{
SendClientMessageToAllEx(-1, ""COL_ROJO"[-]CARRERA: "COL_BLANCO"Se ha Cerrado");
lrace = 0;
}
    case 6: SendClientMessageToAllEx(COLOR_NARANJA, "[DLF]Botz "COL_BLANCO"test4");
    case 7: SendClientMessageToAllEx(COLOR_NARANJA, "[DLF]Botz "COL_BLANCO"test5.");
}
return 1;

}


RE: Help Message all no working - Radical - 2023-11-16

You are using the ptask timer which is for the players.
Use the global task.

PHP Code:
ptask AnunciosChat[50000]()
// ->
task AnunciosChat[50000]() 



RE: Help Message all no working - nbx2000 - 2023-11-17

(2023-11-16, 03:11 PM)Radical Wrote: You are using the ptask timer which is for the players.
Use the global task.

PHP Code:
ptask AnunciosChat[50000]()
// ->
task AnunciosChat[50000]() 
thanks brother solved it I didn't realize the error