AYUDA - colocar nombres debajo del skin
#1

hola disculpenme si coloque mal el post esque soy nuevo y mi primer post es de necesidad de ayuda
bueno entrando en el tema queria saber si alguien podria decirme o explicarme como puedo poner un nombre X por debajo del personaje que uno elige en el inicio del server porfavor.
gracias de antemano salu2
Reply
#2

hay varias formas, la mas simple seria usando esta funcion GameTextForPlayer. si no podrias usar textdraws pero eso es un poco mas avanzado.
Reply
#3

pero en donde mismo ? seria en OnPlayerConnect? si me podes explicar un poco como puedo aser porfavor necesito
Reply
#4

no, seria dentro de OnPlayerRequestClass
usas el parametro classid para determinar q skin esta seleccionado en ese momento y segun el skin el texto q pondras en GameTextForPlayer.

podria ser algo asi:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0){
        GameTextForPlayer(playerid, "~g~Cj", 10000, 1);
        return 0;
    }
    return 1;
}
Nota: si vas a usar varios mensajes, para no usar demasiados if, te recomiendo la sentencia switch. (no es obligatorio, pero sera mas eficiente q usar varios if, o else if).
Reply
#5

Quote:
Originally Posted by the_chaoz
Посмотреть сообщение
no, seria dentro de OnPlayerRequestClass
usas el parametro classid para determinar q skin esta seleccionado en ese momento y segun el skin el texto q pondras en GameTextForPlayer.

podria ser algo asi:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0){
        GameTextForPlayer(playerid, "~g~Cj", 10000, 1);
        return 0;
    }
    return 1;
}
Nota: si vas a usar varios mensajes, para no usar demasiados if, te recomiendo la sentencia switch. (no es obligatorio, pero sera mas eficiente q usar varios if, o else if).
gracias the_chaoz me sirvio
pero como puedo disminuir los segundos que sale el nombre porque sale un promedio de 5 segundos el nombre entonces cuando cambias te sigue saliendo "CJ" nose si me explico
Reply
#6

Se manejan en milisegundos, la zona es esta, checa

pawn Код:
GameTextForPlayer(playerid, "~g~Cj", 10000, 1);
Donde esa "10000" Vienen siendo los milisegundos, modificalos a tu gusto.
Reply
#7

ah ya muchas gracias los 2 me sirvio
Reply
#8

x las dudas te explico
1 seg = 1000milisegundos.
la mayoria de las veces, por no decir siempre(no estoy seguro q todas, pero creo q si) q alguna funcion tenga un parametro llamado time, el tiempo va en milisegundos.
Reply
#9

me aparecen los siguientes errores

C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(303) : error 010: invalid function or declaration
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(305) : error 010: invalid function or declaration
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(307) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


y estas son las lineas qu tengo cual es mi errorayuda




public OnPlayerRequestClass(playerid, classid)
{
iSpawnSet[playerid] = 0;
SetupPlayerForClassSelection(playerid);
return 1;
}
if(classid == 0){
GameTextForPlayer(playerid, "~g~Grove", 10000, 1);
return 0;
}
return 1;
}
Reply
#10

Quote:
Originally Posted by chucho
Посмотреть сообщение
me aparecen los siguientes errores

C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(303) : error 010: invalid function or declaration
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(305) : error 010: invalid function or declaration
C:\Documents and Settings\Geek Man\Escritorio\SERVIDOR\gamemodes\TerritorySkyLine .pwn(307) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


y estas son las lineas qu tengo cual es mi errorayuda




public OnPlayerRequestClass(playerid, classid)
{
iSpawnSet[playerid] = 0;
SetupPlayerForClassSelection(playerid);
return 1;
}
if(classid == 0){
GameTextForPlayer(playerid, "~g~Grove", 10000, 1);
return 0;
}
return 1;
}
En el classid estas retornando un "0", y arriba pusiste los corchetes pero no estas haciendo un ciclo o preguntando algo,creo que ahн estб el error amigo, te quedaria algo asн
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
   if(iSpawnSet[playerid] == 0) return SetupPlayerForClassSelection(playerid), 1;
   if(classid == 0) GameTextForPlayer(playerid, "~g~Grove", 10000, 1);
    return 1;
}
puedes agregarle
pawn Код:
if(classid == 0 || classid == 105 ||classid == 106 || classid == 107 )
   GameTextForPlayer(playerid, "~g~Grove", 10000, 1); //asн te mostrarб el mensaje GROVE a todos los Skin de Groves!
Suerte!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)