Problem with locked skins... + rep!
#1

Код:
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..
Reply
#2

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
Reply
#3

with it is all ok I can spawn with normal classes ... Bud when I use passed skin it's says server close connection.
Reply
#4

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 );
Reply
#5

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
Reply
#6

OMG thanks mate )) Gived you + rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)