Posts: 112
Threads: 38
Joined: Dec 2012
Reputation:
0
Hey, i have mindfucked all day and all night, because i spawn always with CJ skin. I set SpawnInfo, before spawning and into skin parameter i put skin variable, which is retrieved from MySQL. But problem is that, i spawn ALWAYS with CJ skin. Im 100% sure, that my code is OK. If anyone is ever had that kind of problem and might know the solution, please help me.
Posts: 265
Threads: 17
Joined: Jan 2014
Newer heard of something like this.
Posts: 220
Threads: 54
Joined: Jan 2014
pawn Код:
SetSpawnInfo(playerid, 0, 123, X, Y, Z, A, 0, 0, 0, 0, 0, 0); // You will spawn with skin number 123.
SpawnPlayer(playerid); // Spawn the player is forced.
If you are using MySQL, it may be a field in your table that contains the skin and on your gamemode you PlayerInfo a variable or other (pInfo...), and we must proceed like this:
pawn Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], X, Y, Z, A, 0, 0, 0, 0, 0, 0); // We will look for the skin that the player has.
SpawnPlayer(playerid); // Spawn the player is forced.