SA-MP Forums

Go Back   SA-MP Forums > SA-MP DL Edition > SA-MP 0.3.DL

Reply
 
Thread Tools Display Modes
Old 17/01/2018, 01:37 PM   #1
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Post [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Server side class selection for 0.3.8 custom skins!

Last updated 2018/1/18

Quick view of what this can do:
This can:
1- Make you add custom skins from in-game to the class selection.
2- Make you remove added custom skins from in-game from the class selection.
3- Give you a custom place with a text on the back you can even write your server's name.
4- Detect when a skin is added.
5- Control informative messages.
6- Control number of skins you want.
7- Added skins script wise too which can still be removed and added again from in-game.
8- Usage through buttons & commands.
9- Very user friendly gives you full control.
10- No errors/warnings i made exceptions for everything (literally) you'll see the load of #if defined #else #endif
======
Comment:
Well i know 0.3.8 was cancelled but meh i'm still releasing this because some servers still use 0.3.8 and it will be a while til it's completely killed til the -DL feature is added on the official samp release.
=====
Why you need this:
AddPlayerClass will NOT add custom skins and will return 0 (Cj skin) on view, it will give the custom skin but will show you Cj's skin which is not something you need to deal with, this is a server-side class selection system that's very friendly.
=====
Usage & Features :
1- put #MAX_SKINS_USED [NUMBER] BEFORE the include in your script with the number of custom skins you'd want to use to avoid overloaded data you can add any number but its best to choose the number you want also the skin ids you use can only range from 25000 to 30000, its 50 by default, for ex: if i will use 50 i will do: #define MAX_USED_SKINS 50
2-You can use this simply by including it and put AddSkin(custom skin id); at OnFilterScriptInit or OnGameModeInit to add the custom skin only once for ex :
PHP Code:
public OnGameModeInit()
{
    
AddSkin(25001);//add skin id 25001 to the class selection.
    
return 1;

For extended use:
1- you can control the messages player's get when they connect i made by putting:#define ENABLE_CMSGS on top of your script BEFORE the include.
2-There's another feature which is #define ENABLE_COMMANDS that will enable commands built in the include put it BEFORE the include that put 2 exceptions for either ZCMD will use CMD: if you don't use zcmd it will use OnPlayerCommandText, but you can go into my include and take out the cmds and apply them your own, Those cmds give you the ability to: 1- Add skin ids through the game (/addrclass) and remove them too (/removerclass) also check what you got with /checkrclass
3- Buttons to use are hold Spacebar and L-ALT to enter the class selection mode or /rclass if u enable my cmds and do that again in the class selection to exit or use /saverskin, you can switch between skins using buttons Y and N.
4- Custom place for the skin selection with a text you can edit through the script its set to 0.3.8 by default.
5- OnAddSkin(skinid); called the moment a skin is added you can use that for whatever you want.
6- Sum up you can put before including the include.
Code:
#define ENABLE_COMMANDS // Enables commands.
#define ENABLE_CMSGS // Enables connect messages.
#define KEY_SCLASS  //the key used for the class selection enter
#define KEY_RCLASS  //key for switching between skins forward
#define KEY_LCLASS // key for switching backwards between skins
forward OnAddSkin(skinid);//Called the moment a skin is added.
forward OnPlayerSpecialRequestClass(playerid); // called the moment a player enters special class mode.
forward OnPlayerChangeSpecialClass(playerid, oldskin, newskin);// called the moment a player changes his skin in the special class mode.
forward OnPlayerFinishSpecialClass(playerid, fskinid);// called the moment a player finishes and exits the special class mode.
AddSkin(skinid); //Used to add skins. (better use only once to avoid repeated skins!.
NOTE: /addrclass and /removerclass and /checkrclass are built-in cmds and for rcon admins only but you can change that.
======
Screen Shots:

=======
Downloads:
Github : LINK
Pastebin : LINK
Attached : LINK
=====
Related release:
You can check my include that fixes and patches the GetPlayerCustomSkin and gives you a IsPlayerUsingCustomSkin feature through this: LINK and for more of my releases visit my signature/pastebin/github.
======
Code:
Change.Log:
UPDATE 1: used an enum to store player variables and optimized the script a little, gave you the option to change keys used in the process you can define them BEFORE the include the following keys are:
#define KEY_SCLASS  //the key used for the class selection enter
#define KEY_RCLASS  //key for switching between skins forward
#define KEY_LCLASS // key for switching backwards between skins
and added a /checkrclass command to see all added skins compatible with the removals.
also added OnPlayerSpecialRequestClass(playerid); you can declare that on your script its called the moment a player enters special skin selection.
also added OnPlayerChangeSpecialClass(playerid, oldskin, newskin); that's called the moment a player changes his skin using the buttons inside the special class selection.
also added OnPlayerFinishSpecialClass(playerid, fskinid); called the moment the player finishes and exits the special class selection.
===========================
Planning to: Add selectable textdraws if i see more people interested in this otherwise i wont bother.
=====
You may/may not:
1-You may edit this for your personal use.
2-You may not republish this without my permission.
3-You may not remove the credits from the script ( i didnt add any messages or anything in-game ) i don't like how some people advertise their self blatantly in their scripts with a sendclientmessage everywhere but my credits are comments and print.
======
Enjoy. Let me know if you got any questions/doubts, all comments appreciated.
Attached Files
File Type: zip rClassV1.1.zip (3.4 KB, 11 views)
File Type: zip rClassV2.zip (3.8 KB, 17 views)
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.

Last edited by RogueDrifter; 19/01/2018 at 07:07 AM.
RogueDrifter is offline   Reply With Quote
Old 17/01/2018, 01:44 PM   #2
Richi
Little Clucker
 
Richi's Avatar
 
Join Date: Jul 2010
Location: Spain
Posts: 14
Reputation: 4
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Good job.
__________________
Richi is offline   Reply With Quote
Old 17/01/2018, 01:52 PM   #3
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Thanks!
EDIT: STILL DIDN'T LOSE INTEREST! lol.
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.

Last edited by RogueDrifter; 18/01/2018 at 12:45 AM.
RogueDrifter is offline   Reply With Quote
Old 17/01/2018, 04:36 PM   #4
Locky_
High-roller
 
Join Date: Jul 2012
Posts: 1,503
Reputation: 283
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

I had made a fix available to anyone using the old class selection mode.

https://pastebin.com/zZK8yDG2
Locky_ is offline   Reply With Quote
Old 17/01/2018, 09:39 PM   #5
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Quote:
Originally Posted by Locky_ View Post
I had made a fix available to anyone using the old class selection mode.

https://pastebin.com/zZK8yDG2
Oh okay.
Edit: i just tested your include and it works good, well done i'll rep u for that, if anyone wants a simple fix i recommend locky's include, if you want more features you can use mine.
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.

Last edited by RogueDrifter; 18/01/2018 at 12:45 AM.
RogueDrifter is offline   Reply With Quote
Old 19/01/2018, 06:11 AM   #6
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Updated Made a huge change with many new functions and improved the performance a bit everyone who downloaded this please update to version 2 and read the change log, enjoy!.
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.
RogueDrifter is offline   Reply With Quote
Old 19/01/2018, 12:42 PM   #7
Kasis
Huge Clucker
 
Kasis's Avatar
 
Join Date: Mar 2010
Location: Weed, New Mexico
Posts: 412
Reputation: 31
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Nice man!
Kasis is online now   Reply With Quote
Old 19/01/2018, 01:04 PM   #8
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Quote:
Originally Posted by Kasis View Post
Nice man!
Thanks! i'll add an optional selectable textdraw soon with a #define RCLASS_MODE so people can either use selectable textdraws or buttons on the next update if more ppl are into this.
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.
RogueDrifter is offline   Reply With Quote
Old 19/01/2018, 01:11 PM   #9
Sting.
Gangsta
 
Sting.'s Avatar
 
Join Date: May 2011
Location: Malaysia
Posts: 851
Reputation: 101
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Awesome work mate,
Sting. is offline   Reply With Quote
Old 19/01/2018, 01:27 PM   #10
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,166
Reputation: 190
Default Re: [INCLUDE]0.3.8(0.3.7-DL)Skinclass selection(rClass)

Quote:
Originally Posted by Sting. View Post
Awesome work mate, ;)
Thanks sting :)
__________________
Quote:
Originally Posted by RogueDrifter
-For fuck's sake people stop deleting your help threads you're just losing chances of ever getting help again...
[Tutorial]:Anti-cheat guide ||Mini-game 101||VC/LC maps install

[Github]:Link [Pastebin]:Link [Forum]:Link [Server]:Link [Discord]:Link



Quote:
Originally Posted by RogueDrifter
-I'm now available to script small scripts for payments done through paypal.
RogueDrifter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Team Selection and Class Selection CrazyPerry Scripting Help 1 10/11/2017 07:32 PM
Clickable Textdraws dont work when i put #include <YSI\y_iterate> and #include <YSI\y_areas> ervinmasic Scripting Help 20 24/01/2016 10:01 PM
[Pedido] include Anti Cheat - poste sua include! PabLoHenriique Português/Portuguese 6 21/06/2014 07:51 PM
Making an OnFilterScriptInit in an include without adding anything in the .pwn exepct the #include r3k1lLz_ Help Archive 6 06/01/2011 07:49 AM


All times are GMT. The time now is 12:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.