30.05.2014, 06:53
Hello , can someone show me or help me to do skin and x,y,z saving and loading using y_ini ? I would appreciate your effort to help me
Float:SX,
Float:SY,
Float:SZ,
Skin,
GetPlayerPos(playerid, pInfo[playerid][SX], pInfo[playerid][SY], pInfo[playerid][SZ]);
INI_WriteFloat(File, "XPos", pInfo[playerid][SX]);
INI_WriteFloat(File, "YPos", pInfo[playerid][SY]);
INI_WriteFloat(File, "ZPos", pInfo[playerid][SZ]);
INI_WriteInt(File, "Skin", GetPlayerSkin(playerid));
INI_Float("XPos", pInfo[playerid][XPos]);
INI_Float("YPos", pInfo[playerid][YPos]);
INI_Float("ZPos", pInfo[playerid][ZPos]);
INI_Int("Skin", pInfo[playerid][Skin]);
SetPlayerPos(playerid, pInfo[playerid][XPos], pInfo[playerid][YPos], pInfo[playerid][ZPos]);
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
Inside your player enum (Put this in the middle, if you put this in the last, remove the "," at the last variable)
pawn Код:
pawn Код:
pawn Код:
pawn Код:
|
if(pInfo[playerid][Skin] != -1)
{
SpawnPlayer(playerid);
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
return 1;
}