Skin Doubt
#1

I wanted to get your guys opinion on this, I really don't know. Well I'll start. I have a cmd to setplayerskin right, to any ID's. Well my doubt is, I set my friend's skin to ID "something", and all of us view him like that, but when he dies, and respawns, he will be in the previous/spawn skin but we still see him as that ID "something" I switched him to.

Here's an example, for those who can't understand what I'm expressing.

For example, my friend spawned as a Grove Street member ok?, and he dies, he respawns as a Grove Street member all over again right, but when I use the Set player skin to set his skin ID, etc. Cop skin, and when he dies again, for him he respawns as a grove street member (I mean for him, its the Grove Street Skin) but when he see him respawned, he would still be having the same skin. Now why is that?
Reply
#2

Please show some snippets of
OnPlayerSpawn , OnPlayerDeath and where you set his skin
Reply
#3

Hmm, I'm technically using a phone right now but Ill answer your questions. My OnPlayerSpawn has nothing to do with skins and either with OnPlayerDeath. The player actually obtains the skin via requestclass and then spawn with it. The setplayerskin is used by an admin command to give a player a skin.

Besides, like I said, my friend spawns with the requestclass skin, but why we the others don't see him after I used the giveskin admin command and he respawns as we see him with the skin I gave him is the doubt. Why isn't he synced with us...?
Reply
#4

Still, you have to set player skin when is OnPlayerSpawn called.
Reply
#5

One thing I did that helped me out alot is axtually saving the players skin in the player database and setting it when he spawns or connects may not be the best way but this is how I did it
Reply
#6

That's so weird! it also happened on my server before, when a cop kills a wanted he gets put in jail but for some reason the player sees himself as truth but i see him as his normal skin and it doesn't change on all player's screens except his own, i ran through my code thousands of times and didn't find a setplayerskin related to that process, i just ended up putting my own setplayerskin for when the player spawns.
Reply
#7

And the discussion continues....

So like you guys suggest we set skin through OnPlayerSpawn huh?
Reply
#8

you should give it a try.
Reply
#9

problem is active with modded GTA:SA, so add SetPlayerSkin manually when player spawns.
by the way you can save player's selected class skin and than give it to him when he spawns.
Reply
#10

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
problem is active with modded GTA:SA, so add SetPlayerSkin manually when player spawns.
by the way you can save player's selected class skin and than give it to him when he spawns.
I wonder how to do that. Anyway I need you guys to assist me with assigning skins. I'll give a layout, please help me with the setplayerskin for spawn. I'm using case's, on player request, so like how do I set em? Here is the layout:

Код:
AddPlayerClass(105, 2519.1033,-1678.6353,14.6157,87.0213, 0, 0, 0, 0, 0, 0); 
	  AddPlayerClass(106, 2512.2603,-1651.3379,13.9391,132.4550, 0, 0, 0, 0, 0, 0); 
	  AddPlayerClass(107, 2459.5808,-1689.7971,13.5426,359.6238, 0, 0, 0, 0, 0, 0);
And then OnPlayerRequestClass,

Код:
switch (classid)
	{
		case 0,1,2://Grove
		{
			GameTextForPlayer(playerid, "~g~Grove Street", 2500, 6);
			SetPlayerInterior(playerid,0);
			SetPlayerPos(playerid, 2495.072753, -1666.073608, 13.343750);
                        SetPlayerFacingAngle(playerid, 143.819030);
                        SetPlayerCameraLookAt(playerid, 2495.072753, -1666.073608, 13.343750);
                        SetPlayerCameraPos(playerid, 2495.072753 + (5 * floatsin(-143.819030, degrees)), -1666.073608 + (5 * floatcos(-143.819030, degrees)), 13.343750);
			ApplyAnimation(playerid,"GHANDS","gsign4",4.1,1,1,1,1,1,1);
			SetPlayerTeam(playerid, 0);
                        GetPlayerTeam(playerid);
		}
So, at OnPlayerSpawn, I get the team to set team colors ok?

Код:
if(GetPlayerTeam(playerid) == 0) //Grove
{
    SetPlayerColor(playerid,0x33AA33FF);
}
So like, where do I place the set player skin at? As you see above, case 0,1,2 are the skins (addplayerclass). Now, how can I set it to set player's skin? What should I do? if...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)