SA-MP Forums Archive
Spawn problem 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)
+--- Thread: Spawn problem CJ (/showthread.php?tid=471674)



Spawn problem CJ - kbalor - 24.10.2013

I don't know why I always spawn as CJ. I have AddPlayerClass 0 to 299 under OnGameMode int.


Respuesta: Spawn problem CJ - Parka - 24.10.2013

Ensure that in OnPlayerSpawn no set the skin of Cj


Re: Spawn problem CJ - x96664 - 24.10.2013

Maybe it's caused by SetSpawnInfo, if you are using this function.


Re: Spawn problem CJ - kbalor - 24.10.2013

I found this under OnPlayerConnect

Quote:

ResetVariables(playerid)
{
pInfo[playerid][Registered] = 0;
pInfo[playerid][Logged] = 0;
pInfo[playerid][pLevel] = 0;
pInfo[playerid][Kills] = 0;
pInfo[playerid][Duels] = 0;
pInfo[playerid][Deaths] = 0;
pInfo[playerid][Jailed] = 0;
pInfo[playerid][Muted] = 0;
pInfo[playerid][GodMode] = 0;
pInfo[playerid][Frozen] = 0;
pInfo[playerid][Donator] = 0;
pInfo[playerid][Banned] = 0;
pInfo[playerid][Score] = 0;
pInfo[playerid][Cash] = 0;
pInfo[playerid][Spawned] = 0;
pInfo[playerid][Locked] = 0;
pInfo[playerid][LoginAttempts] = 0;
pInfo[playerid][PingExceeds] = 0;
pInfo[playerid][Skin] = 0;
pInfo[playerid][VGod] = 0;
pInfo[playerid][pAutoLogin] = 0;
pInfo[playerid][Spec] = 0;
pInfo[playerid][Warns] = 0;
pInfo[playerid][Hidden] = 0;
pInfo[playerid][AHide] = 0;
pInfo[playerid][NameTagHidden] = 0;
pInfo[playerid][Clicked] = -1;
pInfo[playerid][SpamWarns] = 0;
pInfo[playerid][VWorld] = 0;
pInfo[playerid][AntiCheatWarns]= 0;
pInfo[playerid][TempBan] = 0;
pInfo[playerid][TotalSecs] = 0;
pInfo[playerid][SpawnedCars] = 0;
pInfo[playerid][LastSpawnedCar]= -1;
SetPVarString(playerid,"ChatMsg","|None|");
SetPVarInt(playerid, "OldScore", 0);
SetPVarInt(playerid, "OldCash", 0);
SetPVarInt(playerid,"Interior", 0);
SetPVarInt(playerid, "world", 0);
pInfo[playerid][ConnectedTime] = gettime();
ResetPlayerMoney(playerid);
SetPlayerScore(playerid,0);
#if MoveSystem == true
pInfo[playerid][Move] = 0;
#endif

}

I tried to change

pInfo[playerid][Skin] = 0;

to

pInfo[playerid][Skin] = 1;

and it changed my skin to skin 1 the old hobbo man. And then I removed the line pInfo[playerid][Skin] = 1;
and it return back to cj skin.