SA-MP Forums Archive
Help With My Gamemode - 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: Help With My Gamemode (/showthread.php?tid=71324)



Help With My Gamemode - Alec24 - 31.03.2009

This is a new gamemode I have started and I am having trouble with a few things:

> Players skin doesnt seem to be saved. Its always 0
> If the account is registered then the player doesnt need to use class select screen just SpawnPlayer. It always shows class select even if registered.

Script: http://pawn.pastebin.com/d54c12e07

Thanks!


Re: Help With My Gamemode - ICECOLDKILLAK8 - 31.03.2009

1) By the time OnPlayerDisconnect is called thier game is fully unloaded so it returns 0 for GetPlayerSkin,
2) Use SpawnPlayer


Re: Help With My Gamemode - Alec24 - 31.03.2009

OK so I have fixed the skin saving part but what is wrong with this?

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if (!dini_Exists(udb_encode(PlayerName)))
        {
        SetPlayerPos(playerid, -78.8672, -1134.3965, 1.0781);
        SetPlayerFacingAngle(playerid, 66);
        SetPlayerCameraPos(playerid, -83.8363, -1133.8111, 1.6858);
        SetPlayerCameraLookAt(playerid, -73.8363, -1133.8111, 1.6858);
    }
    else
    {
        SpawnPlayer(playerid);
    }
  return 1;
}