Little Spawn help!
#1

Hi,

Here we go again, Is there any possibility to avoid class selection(SKIN) after player login in! I know about SpawnPlayer(playerid) and blabla but where should i set it and I'm using skin saving, so whoever has own skin saved he should be spawned after login without any skin selection! +REP

I use something like this inside OnPlayerConnect

Код:
if(PlayerInfo[playerid][Skin] != -1)
     {
     	SpawnPlayer(playerid);
    	SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
     }
OnPlayerSpawn

Код:
SetPlayerSkin( playerid, PlayerInfo[playerid][Skin] );
So, How should i create to avoid skin (class selection) to peoples who saved his skin! Thanks REP
Reply
#2

Anyone ? Need it fast Sorry bump!
Reply
#3

Here you go.

PHP код:
SpawnPlayer(playerid); 
Reply
#4

Quote:
Originally Posted by aoky
Посмотреть сообщение
Here you go.

PHP код:
SpawnPlayer(playerid); 
I wrote this above

Quote:

I know about SpawnPlayer(playerid) and blabla but where should i set it and I'm using skin saving

Reply
#5

Talk about this?
Код:
public OnPlayerRequestSpawn(playerid) return 0;
Reply
#6

Yea but, how do i check with this if player has a saved skin he will be spawned after login without any class(skin selection) ?
Reply
#7

https://sampwiki.blast.hk/wiki/SetSpawnInfo

Try using this before SpawnPlayer(playerid);

Put it under OnPlayerRequestClass.
Reply
#8

I tryed with OnPlayerRequestClass with this:


Same problem

Код:
 if(PlayerInfo[playerid][Skin] != -1)
	{
    SetSpawnInfo(playerid, 255, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
	}
Reply
#9

PHP код:
if(PlayerInfo[playerid][Skin] != -1)
{
    
SetSpawnInfo(playerid255PlayerInfo[playerid][Skin], 0.00.00.00.0000000);
    
SpawnPlayer(playerid);

I think this will work. Not sure. Try it out. Also change the x,y,z coords so that the player doesn't spawn in the middle of nowhere.
Reply
#10

I appriciate your help but still is problem! Used it like example

Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(PlayerInfo[playerid][Skin] != -1)
	{
    	SetSpawnInfo(playerid, 255, PlayerInfo[playerid][Skin], 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    	SpawnPlayer(playerid);
	}
         SetPlayerPos(playerid, 414.6747,-4.1441,994.6751);
        SetPlayerCameraPos(playerid, 213.9725,-12.1422,994.2751);
	SetPlayerFacingAngle(playerid, 31.33);
	SetPlayerCameraLookAt(playerid, 312.6747,-3.3321,994.6751);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)