Gd damn it .. failure[Solved] -
AlbanianGuy - 18.04.2010
look i made a script to save the player skin .. when he dissconects the skin saves like this
Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
and when the player connects and spawns ..
Код:
if (PlayerLogged[playerid] == 1)
{
SetPlayerSkin(playerid,dUserSetINT(PlayerName(playerid)).("UserSkin");
}
and it spawns me with the Carl Johnson skin .. skin id is 0 .. now why does this happen .. before i disconnect i have different skin .. now how is that going to work ?
Re: WTF ! What ???????????????? Whyyy? ?????????? any suggestions ? -
cessil - 18.04.2010
well I don't use dudb but
SetPlayerSkin(playerid,dUserSetINT(PlayerName(play erid)).("UserSkin");
has brackets in the wrong spot, it should look like this
SetPlayerSkin(playerid,dUserSetINT(PlayerName(play erid).("UserSkin"));
Re: WTF ! What ???????????????? Whyyy? ?????????? any suggestions ? -
AlbanianGuy - 18.04.2010
Quote:
Originally Posted by cessil
well I don't use dudb but
SetPlayerSkin(playerid,dUserSetINT(PlayerName(play erid)).("UserSkin");
has brackets in the wrong spot, it should look like this
SetPlayerSkin(playerid,dUserSetINT(PlayerName(play erid).("UserSkin"));
|
i know well i made a mistake here .. but at my scripts it is ok .. with the brackets and everything .. but my questin is that its not working as it supose to ...
Re: Gd damn it .. failure -
Ibanez - 18.04.2010
pawn Код:
if (PlayerLogged[playerid] == 1)
{
SetPlayerSkin(playerid, dUserINT(PlayerName(playerid)).("UserSkin"));
}
That should work
Re: Gd damn it .. failure -
cessil - 18.04.2010
well if I understand this
SetPlayerSkin(playerid,dUserSetINT(PlayerName(play erid).("UserSkin"));
is setting the players skin as "dUserSetINT" and it should be getting the data not saving it
Re: Gd damn it .. failure -
AlbanianGuy - 18.04.2010
Quote:
Originally Posted by 6fears7
pawn Код:
if (PlayerLogged[playerid] == 1) { SetPlayerSkin(playerid, dUserINT(PlayerName(playerid)).("UserSkin")); }
That should work
|
thats waht i have .. but it spawns me with the cj skin
Re: Gd damn it .. failure -
Ibanez - 18.04.2010
Quote:
Originally Posted by AlbanianGuy
Quote:
Originally Posted by 6fears7
pawn Код:
if (PlayerLogged[playerid] == 1) { SetPlayerSkin(playerid, dUserINT(PlayerName(playerid)).("UserSkin")); }
That should work
|
thats waht i have .. but it spawns me with the cj skin
|
In your first post you said your using dUserSetINT, the example i gave you is using dUserINT, so you are using dUserINTand it still isnt working?
Re: Gd damn it .. failure -
AlbanianGuy - 18.04.2010
look .. if i delete my account form the script files and i spawn with a different skin .. not cj .. and i dissconnect .. when i come back to spawn .. it spawns me with te cj skin .. i think it onl saves the skinid 0 ... how to fix that /?
Re: Gd damn it .. failure -
cloud9 - 18.04.2010
Remove this code from OnPlayerDisconnect
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
and put it in OnPlayerSpawn
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
Re: Gd damn it .. failure -
AlbanianGuy - 18.04.2010
Quote:
Originally Posted by Cloud9
Remove this code from OnPlayerDisconnect
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
and put it in OnPlayerSpawn
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
|
look what i did .. i put the
pawn Код:
if(LogedIn[playerid]{
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
}
when the player disconnects .. i didnt move it .. and on playerspawn i put
pawn Код:
If(LogedIn[playerid] ==1){
SetPlayerSkin(playerid,dUserINT(PlayerName(playerid)).("UserSkin");
}
and this time doesnt do a thing
and i looked up the getplayerskin(playerid) and it said this
Код:
Parameters:
(playerid)
playerid The player you want to get the skin from
Returns The skin id (0 if invalid)
and it says taht ir returns the skin id , 0 if invalid .. what does it mean by invalid .. cuz thats what happens to me .. it spawns me with the jc skin .. skin id 0 .. so that means it is invalid.. nowwhat to do ?