Problem with locked skins... + rep! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with locked skins... + rep! (
/showthread.php?tid=323869)
Problem with locked skins... + rep! -
Scrillex - 07.03.2012
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
if(strval(inputtext) == 1337)
{
SendClientMessage(playerid,COLOR_WHITE,"Correct Password. Skin taken.");
SetPlayerSkin(playerid,223);
TogglePlayerControllable(playerid,true);
TogglePlayerSpectating(playerid,0);
SetCameraBehindPlayer(playerid);
SpawnPlayer(playerid);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Invalid Password !");
return 1;
}
}
}
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 4 || classid == 5)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !\nType down the correct password to choose it!","OK","Cancel");
}
When I enter right password it gives me Server closed connection! And player is still ijn server and playable only doesn't show in tab.. Please help me out..
Re: Problem with locked skins... + rep! -
Tom1412 - 07.03.2012
have you tryed just the logging in with just spawn and skin 0?
Cos you might be over complicating the script which will cause it to crash
Re: Problem with locked skins... + rep! -
Scrillex - 07.03.2012
with it is all ok

I can spawn with normal classes ... Bud when I use passed skin it's says server close connection.
Re: Problem with locked skins... + rep! -
Konstantinos - 07.03.2012
There is a bug with
SpawnPlayer(playerid);
Use
SetSpawnInfo before
pawn Код:
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SpawnPlayer( playerid );
Re: Problem with locked skins... + rep! -
Twisted_Insane - 07.03.2012
Simply set the spawninfo before spawning the player, since there's a bug with it in 0.3d:
pawn Код:
SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Re: Problem with locked skins... + rep! -
Scrillex - 07.03.2012
OMG thanks mate

)) Gived you + rep