[HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
Код:
public OnPlayerRequestClass(playerid, classid)
{
new file[128], pname[MAX_PLAYER_NAME];
if(!dini_Exists(file))
{
TogglePlayerSpectating(playerid,0);
SpawnPlayer(playerid);
}
else
format(file, sizeof(file), "\\Positions\\%s.ini", pname);//leader the name of your folder in scriptfiles
SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
SetPlayerFacingAngle(playerid,0.0);
SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
return 1;
}
i want this code to skip skin selection if the file exists, but it isn't doing so
Re: [HELP] With OnPlayerRequestClass <---- -
iggy1 - 24.12.2010
Use this before spawnplayer,
pawn Код:
SetSpawnInfo(playerid, NO_TEAM, 0, 0.0 , 0.0, 0.0, 0.0,-1,-1,-1,-1,-1,-1);
You'll need to set the co-ords, skin and wepons right or set position in OnPlayerSpawn. (works good for me)
EDIT: Just seen your other post, don't toggle the player spectating the spawn them that won't work. You can use TogglePlayerSpectating to remove the class select arrow <> spawn dialog.
Re: [HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
Doesn't work. my camera is static, and i see myself fall.
Re: [HELP] With OnPlayerRequestClass <---- -
iggy1 - 24.12.2010
You need to change the co-ordinates on the code i posted. And it does work trust me.
Don't TogglePlayerSpectating.
Re: [HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
can i use SetPlayerPos instead of SetSpawnInfo ?
Re: [HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
Anyways i tried without TogglePlayerSpectating, same thing, can't even choose skins if the file doesn't exist
Re: [HELP] With OnPlayerRequestClass <---- -
iggy1 - 24.12.2010
As far as i know, no. Its only worked for me with SetSpawnInfo. You could then set the players position in OnPlayerSpawn. You will also need to check if a player has spawned once since they logged in and set a variable saying they have. Then use that variable inside On PlayerRequestClass so it doesnt bypass class select if a player preses f4.
EDIT: @ your last post. Well i'm stumped it works like a treat for me.
Re: [HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
any help with the variables? edit my code? im kinda noobish
Re: [HELP] With OnPlayerRequestClass <---- -
[JnA]DukeNukem - 24.12.2010
Or also i wouldn't mind all players selecting skins, but only the unregistered ones getting what they chosen and the registered spawn and get their previous skin
Re: [HELP] With OnPlayerRequestClass <---- -
iggy1 - 24.12.2010
Did you realise the array "file" is empty (i only just did) so the conditional will always return true. (!)