Requesting help with adding player class -
aTk Pirate - 30.08.2012
I am in progress of making my own RP server, I been readings tut after tut for the past 2 days trying to pick up on scripting since I never did any type of coding before this is a little complicated lol. Anyways I need a player class for my server, I found a tut that explains some of it but I would like to know how to make a menu out of it for like cops, army, civilian, and so on with some of them being locked so not just anyone can be in the army for example.
Re: Requesting help with adding player class -
[HK]Ryder[AN] - 30.08.2012
under the
callback check which class the player is trying to chose...if oyu want it locked do not let the player spawn and send him a message or show a gametext/textdraw saying that he can't choose that class or something.
Re: Requesting help with adding player class -
aTk Pirate - 30.08.2012
Quote:
Originally Posted by [HK]Ryder[AN]
under the callback check which class the player is trying to chose...if oyu want it locked do not let the player spawn and send him a message or show a gametext/textdraw saying that he can't choose that class or something.
|
So like this?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, 1677.4528,-1502.6893,152.1802);
SetPlayerCameraLookAt(playerid, 1677.4528,-1502.6893,152.1802);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
return 1;
}
What else is missing, when I go to start the game it just spawns me out of the boundaries....
Re: Requesting help with adding player class -
[HK]Ryder[AN] - 30.08.2012
Delete the first 2 lines....keep only the SetPlayerSkin line...and as far as spawning out of boundries is concerned...it is a problem with OnPlayerSpawn....
I guess this should help you..
Re: Requesting help with adding player class -
aTk Pirate - 30.08.2012
Quote:
Originally Posted by [HK]Ryder[AN]
Delete the first 2 lines....keep only the SetPlayerSkin line...and as far as spawning out of boundries is concerned...it is a problem with OnPlayerSpawn....
I guess this should help you..
|
Thanks, also why delete the first 2 lines? The wiki tuts said to place them in, is it wrong to use?
Re: Requesting help with adding player class -
[HK]Ryder[AN] - 30.08.2012
They are not wrong...but while the code is being executed the players camera will be in the place you have defined there and as soon as the code is completed(i mean the players ets his skin) the camera will reset....it might lagg for the player..
You can keep it...no harm will be done.
Re: Requesting help with adding player class -
aTk Pirate - 30.08.2012
Quote:
Originally Posted by [HK]Ryder[AN]
They are not wrong...but while the code is being executed the players camera will be in the place you have defined there and as soon as the code is completed(i mean the players ets his skin) the camera will reset....it might lagg for the player..
You can keep it...no harm will be done.
|
I think I will delete it lol, I'd rather minimize as much issues as possible. Thanks for the help, also I asked in another post but got no reply and I am wondering if you could help me....anyways I am looking into possibly adding a huge Welcome text on the players screen for when they enter but only found tuts to place a text into the chat bar. Do you know how to do it?