Gd damn it .. failure[Solved]
#1

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

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"));
Reply
#3

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

pawn Код:
if (PlayerLogged[playerid] == 1)
{
  SetPlayerSkin(playerid, dUserINT(PlayerName(playerid)).("UserSkin"));
}
That should work
Reply
#5

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

Reply
#6

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

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?
Reply
#8

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 /?
Reply
#9

Remove this code from OnPlayerDisconnect
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
and put it in OnPlayerSpawn
pawn Код:
dUserSetINT(PlayerName(playerid)).("UserSkin",GetPlayerSkin(playerid));
Reply
#10

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 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)