See self as CJ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: See self as CJ (
/showthread.php?tid=111795)
See self as CJ -
Daren_Jacobson - 04.12.2009
Okay, I have stumbled upon a very annoying bug.
When you connect and login you see yourself as CJ, other people see you as what your skin is. (set with SetPlayerSkin)
So here I am, and I still don't have a clue where the problem is.
This has been bugging me for the past 2 days, so help would be very nice.
Re: See self as CJ -
ded - 04.12.2009
Post your code (or the part of the code that handles the skins) to pastebin, then post the link here.
Re: See self as CJ -
Daren_Jacobson - 04.12.2009
that is not important, because I even tried putting SetPlayerSkin(playerid, 185); in OnPlayerUpdate, nothing happened, except it would keep reseting your char's animations (think of it as a GetSetPlayerPos)
Re: See self as CJ -
ded - 04.12.2009
Well you expect anyone to work magic with you when they haven't seen any code? lol
Sorry but, no code = no fix.
Re: See self as CJ -
Joe Staff - 04.12.2009
I've run into this problem too. I solved it by simply placing it under OnPlayerStateChange with a newstate == PLAYER_STATE_SPAWNED conditional.
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate==PLAYER_STATE_SPAWNED)SetPlayerSkin(playerid,pSkin[playerid]); //or similar variable
return 1;
}
Alternatively, use
SetSpawnInfo accordingly.
*Late Entry
Quote:
Originally Posted by » Pawnst★r «
Well you expect anyone to work magic with you when they haven't seen any code? lol
Sorry but, no code = no fix.
|
Clearly code wasn't required.
Re: See self as CJ -
ded - 04.12.2009
Clearly code was required since I haven't experienced this "bug" before, therefore I can't magic help out of nowhere.
Re: See self as CJ -
Joe Staff - 04.12.2009
Then call me Magic Joe.
Most people would have found this bug if they were creating a script from scratch, and forgot SetSpawnInfo or my formentioned bit of code.
Re: See self as CJ -
ded - 04.12.2009
I've created a few scripts and never come across it .. yet ;o
Magic Joe it is then!
Re: See self as CJ -
Daren_Jacobson - 04.12.2009
just for lols I will put code, but thanks, it worked, but for some reason I just got banned from my server, and there is no samp.ban
pawn Код:
OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, PI[playerid][pModel]);
SetPlayerSpawn(playerid);
return 1;
}
okay, one more problem which is stopping me from 100% testing this:
I am sending a mysql query, and the string appears to randomly alter the first letter of it's self, so far i have it seen BELECT, CELECT and IELECT if anyone has any clue what this is that would be nice. lol i was setting the query to be busy, so it was just spiraling into an infinite loop.
thanks, it works.