How to save skin and force player class selection ?
#1

-REMOVED-
Reply
#2

First of all you need a User System where you can save the Skin ID in.

On InGameModeInit if I'm right place AddClass( etc etc. )
OnPlayerRequestClass make a system to save it in the User System
And when the player joins and is logged in that he loads the Skin ID etc.

I'm not gonna create a whole script for you, mate. with this you can learn not with asking scripts.
Reply
#3

For yellow makers,

At OnGameModeInit()
pawn Код:
DisableInteriorEnterExits();
Reply
#4

Quote:
Originally Posted by Spydah
Посмотреть сообщение
First of all you need a User System where you can save the Skin ID in.

On InGameModeInit if I'm right place AddClass( etc etc. )
OnPlayerRequestClass make a system to save it in the User System
And when the player joins and is logged in that he loads the Skin ID etc.

I'm not gonna create a whole script for you, mate. with this you can learn not with asking scripts.
Well i'm not good scripter and i can't make register system i tried from videos and Tutorials but everytime there is a problem... I don't want register system just to save it like a House System but with skins ?

Quote:
Originally Posted by Areax
Посмотреть сообщение
For yellow makers,

At OnGameModeInit()
pawn Код:
DisableInteriorEnterExits();
Thanks bro.
Reply
#5

Wait you don't want a User System?

So if you are using the name John and you're offline and I come online as John I just own your house?

Without a user system you can't save money etc. as far as I know.

And this:
Quote:
Originally Posted by dakata994
Посмотреть сообщение
Well i'm not good scripter and i can't make register system i tried from videos and Tutorials but everytime there is a problem...
Just doens't make sense, you wan't to learn don't you?
Repeat and repeat I had this before too, now I'm working on 2 scripts. 1 from scratch and the other one is an edit.

Just use this one: https://sampforum.blast.hk/showthread.php?tid=273088

Read it very good. And try, do it with things, keep trying till all the bugs are solved. If you try and it doens't work people will always help you but if you didn't make a single thing yet and ask for codes, I don't think much people will start writing a code for you.
Reply
#6

Quote:
Originally Posted by dakata994
Посмотреть сообщение
Well i'm not good scripter and i can't make register system i tried from videos and Tutorials but everytime there is a problem... I don't want register system just to save it like a House System but with skins ?
Saving House system skins is same as saving player account details. Its not hard to make an account system actually. You just need to understand the basics. Click Here to redirect to the tutorial by Kush using y_ini by ******.


EDIT: I just realized that the above poster posted the same thread about learning.
Reply
#7

I Don't need help anymore. I will ask a friend to make it.
Reply
#8

pawn Код:
#include <YSI\y_ini>

#define UserPath "%s.ini"

enum PlayerInfo
{
    Skin,
}
new pInfo[MAX_PLAYERS][PlayerInfo];

stock Path(playerid)
{
    new str[150], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), UserPath, name);
    return str;
}

forward loadskin_user(playerid, name[], value[]);

public loadskin_user(playerid, name[], value[])
{
    INI_Int("Skin", pInfo[playerid][Skin]);
    return 1;
}

public OnPlayerConnect(playerid)
{
    if(pInfo[playerid][Skin] != -1)
    {
    SpawnPlayer(playerid);
    SetPlayerSkin(playerid, pInfo[playerid][Skin]);
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new INI:file = INI_Open(Path(playerid));
    INI_SetTag(file, "Player's Skin");
    INI_WriteInt(file, "Skin", pInfo[playerid][Skin]);
    INI_Close(file);
    return 1;
}    

CMD:saveskin(playerid, params[])
{
    new skin = GetPlayerSkin(playerid);
    pInfo[playerid][Skin] = skin;
    SendClientMessage(playerid, -1, "Your skin has been saved !");
    return 1;
}
If you will post your user system (here is a tutorial for it), then i can make it. This is just a part. But it won't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)