Realy big problem, with setting skin on spawning.
#1

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.
Reply
#2

Newer heard of something like this.
Reply
#3

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.
Reply
#4

Iґl put my code here.

pawn Код:
mysql_fetch_field_row(savingstring, "skin");    PlayerInfo[playerid][pSkin] = strval(savingstring);



else if(PlayerInfo[playerid][pEsmanelog] == 1)
{
format( string, sizeof( string ), "Tere tulemast tagasi, "VROHELINE"%s", GetName(playerid));
SendClientMessage(playerid, COLOR_GREY,string);
 SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pLastX],PlayerInfo[playerid][pLastY],PlayerInfo[playerid][pLastZ], 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
Reply
#5

Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)