Maybe a bug or am I wrong? (read) -
blackwave - 28.12.2010
0.3c - RC7
I have a dini system. My OnPlayerRequestSpawn is like this:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new n[MAX_PLAYERS];GetPlayerName(playerid,n,sizeof(n));format(file,sizeof(file),SERVER_USER_FILE,n);
if(!dini_Exists(file))
{
new nome[30]; GetPlayerName(playerid, nome, 30);
ForceClassSelection(playerid);
TogglePlayerControllable(playerid, false);
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "{05E35A}Attention: READ", "{05E35A}Attention. Please, use /register <password> for you be able to spawn. You can't spawn without registering\nAtenзгo. Por favor, use /register <senha> para spawnar. Vocк nгo pode spawnar sem se registrar!","Ok","Ok");
GameTextForPlayer(playerid, "~r~Register before~y~spawn~b~ please",5000,5);
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
SendClientMessage(playerid, cinza, "Use: /skin <id> para trocar seu skin!");
return 0;
}
if(dini_Exists(file) && gPlayerLogged[playerid] == 0)
{
new nome[30]; GetPlayerName(playerid, nome, 30);
GameTextForPlayer(playerid, "~r~Login before~y~spawn~b~ please",5000,5);
PlayerPlaySound(playerid, 1138, 0.0, 0.0, 0.0);
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "{05E35A}Attention: READ", "{05E35A}Attention. Please, use /login <password> for you be able to spawn. You can't spawn without login\nAtenзгo. Por favor, use /login <senha> para spawnar. Vocк nгo pode spawnar sem se logar!","Ok","Ok");
return 0;
}
return 1;
}
It's made for read the positions from player dini, and set his position according with what is wrote on the file. It works normally if I press the button "spawn" on the class selection. Even though, if I press shift, it just spawns on the coordinates: 0.0, 0.0, 0.0. On my gamemode are the classes there:
Код:
AddPlayerClass(165, 0.0, 0.0, 0.0, 90, 23,9999,28,9999,31,9999); // security
AddPlayerClass(285, 0.0, 0.0, 0.0, 90, 22,9999,32,9999,30,9999); // Police
AddPlayerClass(287, 0.0, 0.0, 0.0, 90, 24,9999,32,9999,26,9999); // army
AddPlayerClass(279, 0.0, 0.0, 0.0, 90, 9,1,28,9999,33,9999); // firefighter
AddPlayerClass(276, 0.0, 0.0, 0.0, 90, 24,9999,29,9999,34,9999); // Medic
If I press "spawn" it will spawn the player on the positions from the file, but with shift spawns me on 0.0, 0.0, 0.0. How do I avoid that? (pretty weird)
Re: Maybe a bug or am I wrong? (read) -
blackwave - 28.12.2010
So, can't anyone tell me wtf is wrong with this shit? it's really annoying you spawning with another skin, not the one from dini, and on another position when pressing "shift" on class request. And now sometimes it's having this problem when pressing spawn (sometimes) --'
Re: Maybe a bug or am I wrong? (read) -
_rAped - 28.12.2010
Unless you have KEY_JUMP defined somewhere in your script, I guess it's a bug.