Posts: 150
Threads: 19
Joined: Sep 2008
Reputation:
0
Well, I'm having a little problem, I want to make a skin selection screen, so when the player does /duty, the camera is set in front of the player and you would have to use the left & right keys to select the cop skins. Everytime the keys are pressed a textdraw's text would change corresponding to the skin the player sees, saying things for example LVPD, SFPD, SWAT etc...
Well, could someone point out where to start and what functions to use? Especially explain the part where the keys are used to scroll trough skins.
Thanks.
Posts: 150
Threads: 19
Joined: Sep 2008
Reputation:
0
That's what I know, what I have problems with is making the actual scrolling trough skins using the arrow keys, having a textdraw change to each corresponding skin.
And no, I don't want to use the force the player to the class selection screen method.
Posts: 398
Threads: 19
Joined: Aug 2011
Reputation:
0
What you do is
You set a global variable name it SkinSelection[MAX_PLAYERS];
Set SkinSelection[playerid] = -1;
in /duty
You check if player is cop if(IsPlayerCop(playerid)) or if(PlayerVar[playerid][pCop] == 1) something like that...
Then you set some textdraws ex. "Press the < or > arrow keys to select a skin. Press ENTER when finished."
Set the global var you made earlier to the cop skin SkinSelection[playerid] = CopSkinID;
Freeze the player.
Then in OnPlayerKeyStateChange(playerid, newkeys, oldkeys) have your code:
Check the player to see if SkinSelection[playerid] != -1
if it's not set to -1 then check to see if the player is using the arrow keys or the enter key
if arrow keys have it set the players skin to the next cop skin (left) or previous cop skin (right) then set the global var to the next/previous cop skin
when player hits enter you should make it set the global var back to -1, set the skin, unfreeze the player, and get rid of the textdraws
I can do this for you easily, PM me your Skype info if you want my professional help.
If you don't have Skype, too bad try to figure out how to do it yourself through the clues I've provided you above.
Posts: 639
Threads: 92
Joined: Jul 2011
Reputation:
0
Ah, I see what you are saying, you want some skins to scroll through.
If you are a new scripter, I just recommend having a /skin [skin ID for your faction/group] you can always make the command have to be in the certain area, via IsPlayerInRangeOfPoint.
Posts: 398
Threads: 19
Joined: Aug 2011
Reputation:
0
I completed this for him =]