save player skin and show it to player when login?
#1

How can i only show the skin(OnPlayerRequestClass) that player set during first registry? on the gamemodeint , i already added a few AddPlayerClass.


I have set up a mysql system for my server.

OnPlayerConnect and after the login , the script will go to my server and get the player data and store it in variables.

I stored two variables :
new skin[MAX_PLAYERS];
new cskin[MAX_PLAYERS];

skin is skinID and cskin is chose skin(for verifying the player has chosen skin , value :0/1).

How can i only show the skin they selected and unable to click left or right? the skin ID is in skin variable.

I hope someone could guide me.
Reply
#2

anyone?
Reply
#3

pawn Код:
SetPlayerSkin(playerid, skin id)/*Don't change the playerid, only the skin id*/
For more help just pm me

Skin id's https://sampwiki.blast.hk/wiki/Category:Skins
Reply
#4

Quote:
Originally Posted by MSI
Посмотреть сообщение
pawn Код:
SetPlayerSkin(playerid, skin id)/*Don't change the playerid, only the skin id*/
For more help just pm me

Skin id's https://sampwiki.blast.hk/wiki/Category:Skins
what saving system r u using
like dini/dutils/yini/mysql/sqlite ?

give us some more data to reply with a perfect solution!
Reply
#5

you need to load the skin and put it on SetSpawInfo()
Код:
if(cskin[playerid])
SetSpawnInfo(playerid, 0, skin[playerid], X, Y, Z, 0, 0, 0, 0, 0, 0 );
edited to your statment !
Reply
#6

I think he want to show the model skin to the player when logging in (like mSelection)

Use mSelection, include made by d0, who allows you to show models in textdraws.
You just have to add models on a list in your scriptfiles folder (like skins.txt).
Then, display the skin with the function (i'm not very good on textdraws at all, so i won't show you an example, because if I do a mistake, you'll maybe learn the mistake)
Reply
#7

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
what saving system r u using
like dini/dutils/yini/mysql/sqlite ?

give us some more data to reply with a perfect solution!
He said MYSQL already.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)