SA-MP Forums Archive
[FilterScript] Textdraw de skin en conecciムハ. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Espaテアol/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+----- Forum: Lanzamientos/Releases (https://sampforum.blast.hk/forumdisplay.php?fid=59)
+----- Thread: [FilterScript] Textdraw de skin en conecciムハ. (/showthread.php?tid=617468)

Pages: 1 2


Respuesta: Textdraw de skin en conecciムハ. - Pandz - 25.06.2017

Quote:
Originally Posted by FixFl0w
View Post
Ahora estas dando uso 'playerid' en el public.

Ademミアs esta mal, por lo que veo solo le estas mostrando el textdraw al jugador que spawnea si es admin...

prueba asミス
Code:
new ELTIMER[MAX_PLAYERS];//defines asミス


public OnPlayerRequestSpawn(playerid)
{
	
    cuenta[playerid][cSkin] = GetPlayerSkin(playerid);
    cuenta[playerid][tmpSkin] = GetPlayerSkin(playerid);

    SetPlayerSkin(playerid, cuenta[playerid][cSkin]);
    SetPlayerSkin(playerid, cuenta[playerid][tmpSkin]);

    cuenta[playerid][request] = REQUEST_INGRESO;

    for(new i; i<MAX_PLAYERS; i++)
    {
    if(cuenta[i][cAdmin]) //Esto indica que sミス la variable de administrador estミア seteada a un nム確ero mayor que 0 ejecutarミア esas funciones.
    {
        KillTimer(ELTIMER[i]);
        new Nombrex[MAX_PLAYER_NAME],string[25];
        GetPlayerName(playerid,Nombrex,sizeof(Nombrex));
        format(string,sizeof(string),"%s",Nombrex);
        TextDrawSetString(Conexion1,string);

        TextDrawSetPreviewModel(Conexion3, GetPlayerSkin(playerid));

        TextDrawShowForPlayer(i, Conexion0);
        TextDrawShowForPlayer(i, Conexion1);
        TextDrawShowForPlayer(i, Conexion2);
        TextDrawShowForPlayer(i, Conexion3);

	ELTIMER[i] = SetTimer("TIMEFIX",5000,true,"i",i);
    }
    }
    return 1;
}

forward TIMEFIX(playerid);
public TIMEFIX(playerid)
{
    TextDrawHideForPlayer(playerid, Conexion0);
    TextDrawHideForPlayer(playerid, Conexion1);
    TextDrawHideForPlayer(playerid, Conexion2);
    TextDrawHideForPlayer(playerid, Conexion3);
    return 1;
}
Cムヅigo hecho desde el celular, avisas si hay error.
Me da errores gg
HTML Code:
public OnPlayerRequestSpawn(playerid)
{
	
    cuenta[playerid][cSkin] = GetPlayerSkin(playerid);
    cuenta[playerid][tmpSkin] = GetPlayerSkin(playerid);

    SetPlayerSkin(playerid, cuenta[playerid][cSkin]);
    SetPlayerSkin(playerid, cuenta[playerid][tmpSkin]);

    cuenta[playerid][request] = REQUEST_INGRESO;

   	for(new i; i<MAX_PLAYERS; i++)
    {
    if(cuenta[i][cAdmin]) 
    {
        KillTimer(ELTIMER[i]);
        new Nombrex[MAX_PLAYER_NAME],string[25];
        GetPlayerName(playerid,Nombrex,sizeof(Nombrex));
        format(string,sizeof(string),"%s",Nombrex);
        TextDrawSetString(Conexion1,string);

        TextDrawSetPreviewModel(Conexion3, GetPlayerSkin(playerid));

        TextDrawShowForPlayer(i, Conexion0);
        TextDrawShowForPlayer(i, Conexion1);
        TextDrawShowForPlayer(i, Conexion2);
        TextDrawShowForPlayer(i, Conexion3);
	ELTIMER[i] = SetTimer("TIMEFIX",5000,true,"i",i);//ERROR ACA
    	}
    	}//Y ACA TAMBIEN ME DA
   	return 1;
}



Respuesta: Textdraw de skin en conecciムハ. - FixFl0w - 25.06.2017

Me equivoque en 'SetTimer', era 'SetTimerEx'..

Code:
public OnPlayerRequestSpawn(playerid)
{
	
    cuenta[playerid][cSkin] = GetPlayerSkin(playerid);
    cuenta[playerid][tmpSkin] = GetPlayerSkin(playerid);

    SetPlayerSkin(playerid, cuenta[playerid][cSkin]);
    SetPlayerSkin(playerid, cuenta[playerid][tmpSkin]);

    cuenta[playerid][request] = REQUEST_INGRESO;

   	for(new i; i<MAX_PLAYERS; i++)
    {
    if(cuenta[i][cAdmin]) 
    {
        KillTimer(ELTIMER[i]);
        new Nombrex[MAX_PLAYER_NAME],string[25];
        GetPlayerName(playerid,Nombrex,sizeof(Nombrex));
        format(string,sizeof(string),"%s",Nombrex);
        TextDrawSetString(Conexion1,string);

        TextDrawSetPreviewModel(Conexion3, GetPlayerSkin(playerid));

        TextDrawShowForPlayer(i, Conexion0);
        TextDrawShowForPlayer(i, Conexion1);
        TextDrawShowForPlayer(i, Conexion2);
        TextDrawShowForPlayer(i, Conexion3);
	ELTIMER[i] = SetTimerEx("TIMEFIX",5000,true,"i",i);
    	}
    	}
   	return 1;
}



Respuesta: Textdraw de skin en conecciムハ. - Pandz - 25.06.2017

Quote:
Originally Posted by FixFl0w
View Post
Me equivoque en 'SetTimer', era 'SetTimerEx'..

Code:
public OnPlayerRequestSpawn(playerid)
{
	
    cuenta[playerid][cSkin] = GetPlayerSkin(playerid);
    cuenta[playerid][tmpSkin] = GetPlayerSkin(playerid);

    SetPlayerSkin(playerid, cuenta[playerid][cSkin]);
    SetPlayerSkin(playerid, cuenta[playerid][tmpSkin]);

    cuenta[playerid][request] = REQUEST_INGRESO;

   	for(new i; i<MAX_PLAYERS; i++)
    {
    if(cuenta[i][cAdmin]) 
    {
        KillTimer(ELTIMER[i]);
        new Nombrex[MAX_PLAYER_NAME],string[25];
        GetPlayerName(playerid,Nombrex,sizeof(Nombrex));
        format(string,sizeof(string),"%s",Nombrex);
        TextDrawSetString(Conexion1,string);

        TextDrawSetPreviewModel(Conexion3, GetPlayerSkin(playerid));

        TextDrawShowForPlayer(i, Conexion0);
        TextDrawShowForPlayer(i, Conexion1);
        TextDrawShowForPlayer(i, Conexion2);
        TextDrawShowForPlayer(i, Conexion3);
	ELTIMER[i] = SetTimerEx("TIMEFIX",5000,true,"i",i);
    	}
    	}
   	return 1;
}
GRACIAS