07.04.2012, 12:47
Joder, tio. Nose que es lo que esta mal. (Se me pego el acento mexicano, tiene toda la onda)
Lo que pasa es:
-Cuando el jugador no esta registrado, es llevado a una posicion y le aparece unos tds para elegir el sexo,etc.
-Cuando mueve las flechitas para cambiar su sexo y eso, no anda, no le elige un caraj*.
Codigos:
Adentro de setplayerspawn, para que si no se registro pase lo que tiene que pasar..
Ahora el RegisterOn() ... es largo, y no creo que el error esta ahi, para mi debe haber otra forma de activar esto de que elija sus edad sexo y eso, lo pongo x si las dudas
Bueno, eso es. No tira errores, simplemente los tds ni se mueven y no cambio el sexo ni nada de eso. Para mi tiene que haber otra forma de hacer lo que yo hice con la funcion RegisterOn. Por si les sirve, toy usando Virtual Rol.
Saludss
Lo que pasa es:
-Cuando el jugador no esta registrado, es llevado a una posicion y le aparece unos tds para elegir el sexo,etc.
-Cuando mueve las flechitas para cambiar su sexo y eso, no anda, no le elige un caraj*.
Codigos:
Adentro de setplayerspawn, para que si no se registro pase lo que tiene que pasar..
pawn Код:
if(PlayerInfo[playerid][pTut] == 0)// todavia no empezo el tut, va por la parte del registro..
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;//noc porq, vino asi en el gm tonces lo dejo
SetPlayerInterior(playerid, 0);// bue se sabe, para que no aparesca callendo del cielo..
PlayerInfo[playerid][pInt] = 0;// lo mismo?
PlayerInfo[playerid][pGPS] = 1;// para que tenga mapa... es un embole ir a comprarlo
SetPlayerPos(playerid, posiciones);//lo lleva a las posiciones
SetPlayerFacingAngle(playerid, 228.5058);//bue todo esto es como se ve el pibin
SetPlayerCameraPos(playerid,421.0763,-1556.5420,27.5781);
SetPlayerCameraLookAt(playerid,408.1063,-1546.5571,32.2734);
PlayerPlaySound(playerid, 1056, 0, 0, 0);
TogglePlayerControllable(playerid, 0);//para que no se mueva
RegistrationStep[playerid] = 1;//emm, para que cuando se conecte sepa que va x el 1er paso, elegir el sexo y eso
PlayerInfo[playerid][pOrigin] = 1;// bue otra info..
PlayerInfo[playerid][pAge] = 19;
PlayerInfo[playerid][pSex] = 1;
TextDrawShowForPlayer(playerid,Registro[playerid]);//muestra los tds
RegisterOn(playerid);//el fuckking codigo
RegActivado[playerid] = 1;//ni puta idea, pero estaba...
SendClientMessage(playerid, COLOR_YELLOW, "Use las Flechas para Elejir. Para finalizar una opcion use ENTER.");
return 1;
}
pawn Код:
forward RegisterOn(playerid);
public RegisterOn(playerid){
new keys, updown, leftright,string[128];
GetPlayerKeys(playerid, keys, updown, leftright);
if(RegistrationStep[playerid] > 0)
{
if(leftright == KEY_RIGHT)
{
PlayerPlaySound(playerid, 1055, 0, 0, 0);
if(RegistrationStep[playerid] == 1)
{
PlayerInfo[playerid][pSex] ++;
if(PlayerInfo[playerid][pSex] >= 3)
{
PlayerInfo[playerid][pSex] = 1;
}
if(PlayerInfo[playerid][pSex] == 1) SetPlayerSkin(playerid,7)
else if(PlayerInfo[playerid][pSex] == 2) SetPlayerSkin(playerid,9)
}
else if(RegistrationStep[playerid] == 2)
{
PlayerInfo[playerid][pAge] ++;
if(PlayerInfo[playerid][pAge] >= 81)
{
PlayerInfo[playerid][pAge] = 19;
}
}
else if(RegistrationStep[playerid] == 3)
{
PlayerInfo[playerid][pOrigin] ++;
if(PlayerInfo[playerid][pOrigin] >= 5)
{
PlayerInfo[playerid][pOrigin] = 1;
}
if(PlayerInfo[playerid][pSex] == 1)
{
if(PlayerInfo[playerid][pOrigin] == 1)
{
SetPlayerSkin(playerid,142);
PlayerInfo[playerid][pChar] = 142;
}
else if(PlayerInfo[playerid][pOrigin] == 2)
{
SetPlayerSkin(playerid,26);
PlayerInfo[playerid][pChar] = 26;
}
else if(PlayerInfo[playerid][pOrigin] == 3)
{
SetPlayerSkin(playerid,30);
PlayerInfo[playerid][pChar] = 30;
}
else if(PlayerInfo[playerid][pOrigin] == 4)
{
SetPlayerSkin(playerid,118);
PlayerInfo[playerid][pChar] = 118;
}
}
else if(PlayerInfo[playerid][pSex] == 2)
{
if(PlayerInfo[playerid][pOrigin] == 1)
{
SetPlayerSkin(playerid,13);
PlayerInfo[playerid][pChar] = 13;
}
else if(PlayerInfo[playerid][pOrigin] == 2)
{
SetPlayerSkin(playerid,55);
PlayerInfo[playerid][pChar] = 55;
}
else if(PlayerInfo[playerid][pOrigin] == 3)
{
SetPlayerSkin(playerid,150);
PlayerInfo[playerid][pChar] = 150;
}
else if(PlayerInfo[playerid][pOrigin] == 4)
{
SetPlayerSkin(playerid,224);
PlayerInfo[playerid][pChar] = 224;
}
}
}
}
else if(leftright == KEY_LEFT)
{ PlayerPlaySound(playerid, 1054, 0, 0, 0);
if(RegistrationStep[playerid] == 1)
{
PlayerInfo[playerid][pSex] --;
if(PlayerInfo[playerid][pSex] <= 0)
{
PlayerInfo[playerid][pSex] = 2;
}
if(PlayerInfo[playerid][pSex] == 1) SetPlayerSkin(playerid,7)
else if(PlayerInfo[playerid][pSex] == 2) SetPlayerSkin(playerid,9)
}
else if(RegistrationStep[playerid] == 2)
{
PlayerInfo[playerid][pAge] --;
if(PlayerInfo[playerid][pAge] <= 18)
{
PlayerInfo[playerid][pAge] = 80;
}
}
else if(RegistrationStep[playerid] == 3)
{
PlayerInfo[playerid][pOrigin] --;
if(PlayerInfo[playerid][pOrigin] <= 0)
{
PlayerInfo[playerid][pOrigin] = 4;
}
if(PlayerInfo[playerid][pSex] == 1)
{
if(PlayerInfo[playerid][pOrigin] == 1)
{
SetPlayerSkin(playerid,142);
PlayerInfo[playerid][pChar] = 142;
}
else if(PlayerInfo[playerid][pOrigin] == 2)
{
SetPlayerSkin(playerid,26);
PlayerInfo[playerid][pChar] = 26;
}
else if(PlayerInfo[playerid][pOrigin] == 3)
{
SetPlayerSkin(playerid,30);
PlayerInfo[playerid][pChar] = 30;
}
else if(PlayerInfo[playerid][pOrigin] == 4)
{
SetPlayerSkin(playerid,118);
PlayerInfo[playerid][pChar] = 118;
}
}
else if(PlayerInfo[playerid][pSex] == 2)
{
if(PlayerInfo[playerid][pOrigin] == 1)
{
SetPlayerSkin(playerid,13);
PlayerInfo[playerid][pChar] = 13;
}
else if(PlayerInfo[playerid][pOrigin] == 2)
{
SetPlayerSkin(playerid,55);
PlayerInfo[playerid][pChar] = 55;
}
else if(PlayerInfo[playerid][pOrigin] == 3)
{
SetPlayerSkin(playerid,150);
PlayerInfo[playerid][pChar] = 150;
}
else if(PlayerInfo[playerid][pOrigin] == 4)
{
SetPlayerSkin(playerid,224);
PlayerInfo[playerid][pChar] = 224;
}
}
}
}
else if(keys == KEY_SECONDARY_ATTACK)
{
RegistrationStep[playerid] ++;
if(RegistrationStep[playerid] == 2)
{
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SendClientMessage(playerid, COLOR_YELLOW, "Sexo Registrado. Ahora registre la edad.");
return 1;
}
else if(RegistrationStep[playerid] == 3)
{
PlayerPlaySound(playerid, 1056, 0, 0, 0);
SendClientMessage(playerid, COLOR_YELLOW, "Edad Registrado. Ahora registre el origen.");
return 1;
}
else if(RegistrationStep[playerid] > 3)
{
PlayerPlaySound(playerid, 1057, 0, 0, 0);
RegistrationStep[playerid] = 0;
TutTime[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Origen Registrado. Gracias por rellenar sus datos.");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, ":::::::::::::::::::::::::::::::::::::::::::::::::::::::");
SendClientMessage(playerid, COLOR_GREEN, "Ahora se le dara un breve vistaso al servidor.");
SendClientMessage(playerid, COLOR_LIGHTRED,"Es recomendado no saltar el tutorial, ya que conoceras mejor el server y comienzas con un bonus de dinero!");//no obstante puedes usar el comando /saltartutorial.
SendClientMessage(playerid, COLOR_LIGHTRED,"No obstante puedes usar el comando /saltartutorial.");
//KillTimer(TBotonesReg[playerid]);
TextDrawHideForPlayer(playerid,Registro[playerid]);
return 1;
}
}
new Sexo[128];
new Origen[128];
if(PlayerInfo[playerid][pSex] == 1) Sexo = "Hombre"
else if(PlayerInfo[playerid][pSex] == 2) Sexo = "Mujer"
if(PlayerInfo[playerid][pOrigin] == 1) Origen = "Africa"
else if(PlayerInfo[playerid][pOrigin] == 2) Origen = "Europa"
else if(PlayerInfo[playerid][pOrigin] == 3) Origen = "America"
else if(PlayerInfo[playerid][pOrigin] == 4) Origen = "Asia"
format(string,sizeof(string),"~r~_________Registro ~n~~w~Sexo:~g~~<~ %s ~>~~n~~w~Edad: ~y~~<~%d~>~ ~n~~w~Origen: ~b~~<~%s~>~",Sexo,PlayerInfo[playerid][pAge],Origen);
TextDrawSetString(Registro[playerid],string);
TextDrawShowForPlayer(playerid,Registro[playerid]);
return 1;
}
return 1;
}
Saludss