Skin selection?
#1

Hey! First off, I have a small, but very noob-y question. Should everything I do (register system, car system etc..) be in my gamemode.pwn file? By the way, I'm making the gamemode for scratch, it's an RPG gamemode.
Now, to the main question.
After looking at some tutorials I finished a registration and login system using Y_INI. After I enter my password, I have to press spawn near the arrow keys even though there is no skin to select. After I do this, CJ starts falling through the map however he teleports to land afterwards. I'd like a way to make it so as a new player, you start with a skin that everyone has to use, however you can go to a certain building afterwards and buy a skin there with the currency I plan to implement(another question I have which I'll post later, how to implement custom currency, to avoid money hacks and to be unique), so how would I go about at doing that? Thanks alot!
Reply
#2

1- It's a personal preference whether to write down everything in a single .pwn file or multiple ones, going by the first choice, your script might become messy with time, and disabling functions/debugging would be a nightmare, so making separate .pwn files and including them under a main.pwn for example is the way to go (for huge gamemodes)

2- Add some classes

3- Create a new wrapper function for SetPlayerMoney, it would be something like this
PHP код:
SetPlayerMoneyEx(playeridmoney){
    
PlayerInfo[playerid][pMoney] += money;
    
SetPlayerMoney(playeridPlayerInfo[playerid][pMoney];

or even better, hook SetPlayerMoney funtion
Reply
#3

Hey, thanks for the quick reply. I added 2 classes as the main skins however you can't see them in class selection when you login, you only see the arrows and the spawn button.
Reply
#4

Are you doing like this:
PHP код:
AddClass(xyz);

public 
RequestClass()
{
    
SetPlayerCameraPos(same xsame ysame z as of 'AddClass'); //You must not have the same x, y and z;

Reply
#5

This is what I did:

PHP код:
public OnGameModeInit()
{
    
// Players can spawn with either ID 305 or ID 195
    
AddPlayerClass(3051958.331343.1215.36269.1526362815000);
    
AddPlayerClass(1951958.331343.1215.36269.1526362815000);
    return 
1;

Reply
#6

If you want it to look like Choosing a skin by Model Selection (looks like dialog) you should use mSelection include and visit the thread of mSelection to know how to use it..
Reply
#7

not sure how it works, i'm not copy-paste it
but this is the one works for my gamemode
Код:
for(new i= 0; i<311; i++)
{
     AddPlayerClass(i, X, Y, Z, Facing Angle, 26, 36, 28, 150, 0, 0);
}
Reply
#8

Seeing the code of how you login/register would be nice.
Reply
#9

I have Some Difficulties in making a samp server and my #1 prob Why does my skin run slower like a normal bot in gta singleplayer??
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)