Problema con settimmer
#1

Hola a todos! tengo un problemon con el timmers xd resulta ser que quiero poner este td que aparesca apenas
entra el player al server..resulta ser que le pongo el timmer pero cuando entra es como si no se efectuara la funcion
acontinuacion les dejo el codigo de como lo tengo en onplayer connect
Код:
public OnPlayerConnect(playerid){

 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> ======================================================= <<");
 GetPlayerName(playerid,pname,24);
 format(string,256,"{FF00F3}>> {F7FF00}%s, Bienvenido a Grado Zero 0.3c{FF00F3} <<",pname);
 SendClientMessage(playerid,0xff7e00ff,string);
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> {F7FF00}Servidor Totalmente en Espaсol!, Freeroam/Dm/Stunt/Race! {FF00F3}<<");
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> {F7FF00}Visitanos en Nuestro Foro! www.Grado Zero.net.ms {FF00F3}<<");
 SendClientMessage(playerid,0xff7e00ff,"                               {FF00F3}*** Novedades***");
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> {F7FF00}Anti Drive By Instalado! (06/9/11){FF00F3} <<");
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> {F7FF00}Nuevo DM /AguaDM (26/8/11){FF00F3}<<");
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> {F7FF00}Nuevos 15 Teleports en /Teles Seccion Otros! (26/8/11) {FF00F3}<<");
 SendClientMessage(playerid,0xff7e00ff,"{FF00F3}>> ======================================================= <<");
 GetPlayerName(playerid,pname,24);
 format(string,256, "~n~~n~~n~~n~~n~~n~~w~%s ~g~~h~~h~bienvenido ~w~a Grado Zero",pname);
 GameTextForPlayer(playerid,string,10000,3);
 gActivePlayers[playerid]++;
 TextDrawShowForPlayer(playerid, Textdra0);
 TextDrawShowForPlayer(playerid, Textdra1);
 TextDrawShowForPlayer(playerid, Textdra2);
 TextDrawShowForPlayer(playerid, Textdra3);
 TextDrawShowForPlayer(playerid, Textdra4);
 TextDrawShowForPlayer(playerid, Textdra5);
 TextDrawShowForPlayer(playerid, Textdra6);
 TextDrawShowForPlayer(playerid, Textdra7);
 SetTimer("Inicio",5000,1, "d", playerid);
 return 1;
 }
me canse de probar pero no pasa nada D:
saludoss!!!!
Reply
#2

Tenйs que usar SetTimerEx para funciones con parбmetros.
Reply
#3

pero probe con settimerex tambien D:
saludos!
Reply
#4

Entonces la funciуn inicio no la estas declarando como public, debe ser asн.
pawn Код:
forward inicio(playerid);
public inicio(playerid) {
    //resto
}
y se debe usar si o si SetTimerEx para funciones con parбmetros.
Reply
#5

eso dentro va aparte de onplayer conect porque no tiene el return XD o no?
Reply
#6

Seguro que los textdraw existen, muestra como los estas creando
Reply
#7

Si, va aparte. Ponelo abajo de todo, o arriba, o en el medio :P pero fuera de cualquierr callback.
Reply
#8

bueno me tira este error
Код:
C:\Users\Agustin\Desktop\R.lomas\gamemodes\RompiendoLomasFreeroam.pwn(6411) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
y con respecto a los textdraw estan bien aca miren!
Код:
Textdra0 = TextDrawCreate(458.000000, 125.000000, "e");
        TextDrawBackgroundColor(Textdra0, 255);
        TextDrawFont(Textdra0, 3);
        TextDrawLetterSize(Textdra0, -0.000000, 17.300008);
        TextDrawColor(Textdraw0, -1);
        TextDrawSetOutline(Textdra0, 0);
        TextDrawSetProportional(Textdra0, 1);
        TextDrawSetShadow(Textdraw0, 1);
        TextDrawUseBox(Textdraw0, 1);
        TextDrawBoxColor(Textdraw0, -16776961);
        TextDrawTextSize(Textdraw0, 150.000000, 50.000000);

        Textdra1 = TextDrawCreate(238.000000, 144.000000, "Grado Zero");
        TextDrawBackgroundColor(Textdra1, 255);
        TextDrawFont(Textdra1, 2);
        TextDrawLetterSize(Textdra1, 0.500000, 1.000000);
        TextDrawColor(Textdraw1, -1);
        TextDrawSetOutline(Textdraw1, 0);
        TextDrawSetProportional(Textdra1, 1);
        TextDrawSetShadow(Textdraw1, 1);

        Textdra2 = TextDrawCreate(242.000000, 171.000000, "reeroa");
        TextDrawBackgroundColor(Textdra2, 255);
        TextDrawFont(Textdra2, 3);
        TextDrawLetterSize(Textdra2, 1.009999, 2.200000);
        TextDrawColor(Textdra2, 65535);
        TextDrawSetOutline(Textdra2, 1);
        TextDrawSetProportional(Textdra2, 1);

        Textdra3 = TextDrawCreate(216.000000, 151.000000, "F");
        TextDrawBackgroundColor(Textdra3, 255);
        TextDrawFont(Textdra3, 2);
        TextDrawLetterSize(Textdra3, 1.400000, 5.000000);
        TextDrawColor(Textdra3, 65535);
        TextDrawSetOutline(Textdra3, 1);
        TextDrawSetProportional(Textdra3, 1);

        Textdra4 = TextDrawCreate(363.000000, 148.000000, "M");
        TextDrawBackgroundColor(Textdra4, 255);
        TextDrawFont(Textdra4, 2);
        TextDrawLetterSize(Textdra4, 1.009999, 5.300000);
        TextDrawColor(Textdra4, 65535);
        TextDrawSetOutline(Textdra4, 1);
        TextDrawSetProportional(Textdra4, 1);

        Textdra5 = TextDrawCreate(183.000000, 220.000000, "www.gradozero.net.ms");
        TextDrawBackgroundColor(Textdra5, 255);
        TextDrawFont(Textdra5, 2);
        TextDrawLetterSize(Textdra5, 0.500000, 1.000000);
        TextDrawColor(Textdra5, -1);
        TextDrawSetOutline(Textdra5, 1);
        TextDrawSetProportional(Textdra5, 1);

        Textdra6 = TextDrawCreate(156.000000, 266.000000, "version: 3.7");
        TextDrawBackgroundColor(Textdra6, 255);
        TextDrawFont(Textdra6, 2);
        TextDrawLetterSize(Textdra6, 0.320000, 1.000000);
        TextDrawColor(Textdra6, -1);
        TextDrawSetOutline(Textdra6, 0);
        TextDrawSetProportional(Textdra6, 1);
        TextDrawSetShadow(Textdra6, 1);

        Textdra7 = TextDrawCreate(286.000000, 266.000000, "actualizacion: 2/10/2011");
        TextDrawBackgroundColor(Textdra7, 255);
        TextDrawFont(Textdra7, 2);
        TextDrawLetterSize(Textdra7, 0.300000, 1.000000);
        TextDrawColor(Textdra7, -1);
        TextDrawSetOutline(Textdra7, 0);
        TextDrawSetProportional(Textdra7, 1);
        TextDrawSetShadow(Textdra7, 1);
saludos!
Reply
#9

No entiendo que es lo que querйs hacer, que se supone que hace el timer?
Reply
#10

el timmer es para que cuando apenas entre el jugador al server le aparescan esos textdraw por cierto tiempo
asi no queda para siempre..para eso utilizo el timmer xd saludos!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)