What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) -
McSquizzy - 12.04.2010
In my mod GetPlayerSkin(playerid) works wrongly. It gets me previous skin that i used, but not that i have.
I tried to do like sayed here:
http://forum.sa-mp.com/index.php?topic=166501.0 but sill same thing
Here is code:
Code:
skin[playerid] = GetPlayerSkin(playerid);
PlayerInfo[playerid][pModel] = skin[playerid];
SetPlayerSkin(playerid, skin[playerid]);
But it gives me not that skin that "it gets", as i said he gets and gives previosly used skin
_________________________________________________
In short GetPlayerSkin(playerid) returns not that skin that I have
Here is what I got when I /getskin :
command /getskin
pawn Code:
if(strcmp(cmd, "/getskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
format(string, sizeof(string), "* Your skin: %d", GetPlayerSkin(playerid));
SendClientMessage(playerid, COLOR_GREY,string);
return 1;
}
return 1;
}
But if I'll give me skin with standart GF command /setstat ID 4(Model) SkinID /getskin returns correct skin
In both cases I use SetPlayerSkin(playerid, SkinID), but It works really normally in second case(/setstat)
Re: GetPlayerSkin(playerid) - working?! -
Assyria - 12.04.2010
Soorry, can't get anything what your talking about? Please explain better.
Re: GetPlayerSkin(playerid) - working?! -
McSquizzy - 12.04.2010
ohh, sorry. my english isn't best)
For example:
I have skin ID 174, I go to the shop and buying new skin, but after I buyed and payed it gives me still skin ID 174, not new.
I have RP mod. I think that this started in SA-MP 0.3 R7, which was updated from R3
Re: GetPlayerSkin(playerid) - working?! -
McSquizzy - 15.04.2010
In short GetPlayerSkin(playerid) returns not that skin that I have
Here is what I got when I /getskin :
command /getskin
pawn Code:
if(strcmp(cmd, "/getskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
format(string, sizeof(string), "* Your skin: %d", GetPlayerSkin(playerid));
SendClientMessage(playerid, COLOR_GREY,string);
return 1;
}
return 1;
}
But if I'll give me skin with standart GF command /setstat ID 4(Model) SkinID /getskin returns correct skin
In both cases I use SetPlayerSkin(playerid, SkinID), but It works really normally in second case(/setstat)
Re: What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) -
McSquizzy - 15.04.2010
Updated a little
Re: What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) -
Thrarod - 15.04.2010
Hmm... Copy setstat's skin changing part and copy to buyclothes?
Re: What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) -
McSquizzy - 15.04.2010
/setstat
pawn Code:
SetPlayerSkin(giveplayerid, amount);
PlayerInfo[giveplayerid][pModel] = amount;
format(string, sizeof(string), " The Player Was Set To Model %d", amount);
buy clothes:
pawn Code:
skin[playerid] = GetPlayerSkin(playerid);
PlayerInfo[playerid][pModel] = skin[playerid];
TogglePlayerControllable(playerid, true);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, GetPlayerSkin(playerid));
SavePlayer(playerid);
And after buy clothes SetPlayerSkin it gives old skin
was like that:
pawn Code:
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
TogglePlayerControllable(playerid, true);
SetCameraBehindPlayer(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
SavePlayer(playerid);
same thing. in both cases gives old skin, and in PlayerInfo[playerid][pModel] & skin[playerid] it writes too old skin...
Also: I think that this started after server was updated from R3 to R7
Re: What's wrong with skins? GetPlayerSkin(playerid) & SetPlayerSkin(playerid, skin) -
McSquizzy - 16.04.2010
Bump. Was problem with mod.