How to skip OnPlayerRequestClass? -
CesarLT - 22.09.2013
Hello everyone, I had a similar thread but it seems like it was deleted, so sorry for asking again.
How can I skin the screen where it requests to choose a skin and hit the "Spawn" button?
I need the character to spawn right after he clicked "okay" after inputting pass.
Another question, how to make a gun saving system, which will save the guns?
And how to give a player money amount only once, since I have pCash saving..and every time I enter I get money again and again.
And last question, is how to save the skin which a player bought, making him to spawn with it untill he'll buy a new one.
Thanks in advance.
EDIT: No ready stuff please, a tutorial would be really greatfull. (I was searching before I posted, didn't figure out.)
Re: How to skip OnPlayerRequestClass? -
x96664 - 22.09.2013
Check for SetSpawnInfo (how to use it) and put it in the OnPlayerRequestClass callback, also when player logs add this SpawnPlayer(playerid);
Re: How to skip OnPlayerRequestClass? -
CesarLT - 22.09.2013
Quote:
Originally Posted by x96664
Check for SetSpawnInfo (how to use it) and put it in the OnPlayerRequestClass callback, also when player logs add this SpawnPlayer(playerid);
|
Didn't work...?
AW: How to skip OnPlayerRequestClass? -
Littl3j0hNy - 22.09.2013
You must use a timer:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetTimerEx("SpawnThePlayer", 1, 0, "i", playerid);
return 1;
}
pawn Код:
forward SpawnThePlayer(playerid);
public SpawnThePlayer(playerid)
{
SpawnPlayer(playerid);
return 1;
}
Greetz!
Re: AW: How to skip OnPlayerRequestClass? -
CesarLT - 22.09.2013
Quote:
Originally Posted by Littl3j0hNy
You must use a timer:
pawn Код:
public OnPlayerRequestClass(playerid, classid) { SetTimerEx("SpawnThePlayer", 1, 0, "i", playerid); return 1; }
pawn Код:
forward SpawnThePlayer(playerid); public SpawnThePlayer(playerid) { SpawnPlayer(playerid); return 1; }
Greetz!
|
That worked fine! Thank you!
Re: How to skip OnPlayerRequestClass? -
JimmyCh - 22.09.2013
Actually you can can just SpawnPlayer(playerid) when he presses "okay" like you wanted, with no timer -_-
Anyway, for the rest..
I've seen many gun saving systems on the forums, you can just check the script out to know how it's done.
As for the skin, just use GetPlayerSkin(playerid) and save it to his user file, then on the loading use SetPlayerSkin(playerid, Skin-here) [[Load the skin from the file and use SetPlayerSkin to make him use it]].
That's all!

Good luck!