Skin selection? -
Vitakrone - 14.07.2017
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!
Re: Skin selection? -
Eoussama - 14.07.2017
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(playerid, money){
PlayerInfo[playerid][pMoney] += money;
SetPlayerMoney(playerid, PlayerInfo[playerid][pMoney];
}
or even better, hook
SetPlayerMoney funtion
Re: Skin selection? -
Vitakrone - 14.07.2017
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.
Re: Skin selection? -
coool - 14.07.2017
Are you doing like this:
PHP код:
AddClass(x, y, z);
public RequestClass()
{
SetPlayerCameraPos(same x, same y, same z as of 'AddClass'); //You must not have the same x, y and z;
}
Re: Skin selection? -
Vitakrone - 14.07.2017
This is what I did:
PHP код:
public OnGameModeInit()
{
// Players can spawn with either ID 305 or ID 195
AddPlayerClass(305, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
AddPlayerClass(195, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
return 1;
}
Re: Skin selection? -
JasonRiggs - 14.07.2017
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..
Re: Skin selection? -
MiyuUchiha - 14.07.2017
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);
}
Re: Skin selection? -
Meller - 14.07.2017
Seeing the code of how you login/register would be nice.
Re: Skin selection? -
ZyKerZhEn - 31.10.2017
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??
