PDA

View Full Version : class system help???


hardiksingh5
01/04/2015, 02:35 PM
I want create a Trucking/Missions server and i need help i dunno how to.



Can be 2 variants, better i will like variant 1



1.variant
When joins server Opens a dialog: (to select the job classe)

Trucker
Police
Pilot
Taxi driver
Mafia
Sailor
Pizza man
Bus driver
Firefighter
Mechanic
Farmer
Postman
Train driver

When selected job classe shows skins what to choose: (on selected job classe)

When selected the skin opens dialog where to spawn: (with selected skin in selected job classe)

And spawn the player in selected job classe with selected skin and with classe color:



2.variant
When joined server shows the skin and class name.

When selected the skin opens dialog where to spawn: (with selected skin in selected job classe)

And spawn the player in selected job classe with selected skin and with classe color:


JOB CLASSES = COLORS (colors can be different from exampe i will change them)
------------------------------
Trucker = yellow
Police = dark blue
Pilot = dark green
Taxi driver = green
Mafia = orange
Sailor = light blue
Pizza man = pink
Bus driver = purple
Firefighter = black
Mechanic = gray
Farmer = lime green
Postman = dark gray
Train driver = dark green

Police job score limit 300
Mafia job score limit 150
Pilot job score limit 100
Firefighter job score limit 60
Sailor job score limit 40

JaydenJason
01/04/2015, 02:40 PM
It's great to hear what you want to be made.

edit, i won't be that harsh

Sadly we won't make anything you request here, as this is "Scripting help", not Scripting requests, so you can either go to this thread (http://forum.sa-mp.com/showthread.php?t=447813) and search for a developer that's going to make it for you, you can post your code here that you have made, an attempt is more than enough but don't do like one single line and expect us to write the rest.

Here's a little begin for you.

public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 7376, DIALOG_STYLE_LIST, "Select Job", "Trucker\nPolice\nPilot\nTaxi driver\nMafia\nSailor\nPizza man\nBus driver\nFirefighter\nMechanic\nFarmer\nPostman\nTr ain driver", "Select Job", "");
}

(although i think that's too long and you should use strcat (http://wiki.sa-mp.com/wiki/Strcat) for it)

And for it's responses you could use this. (http://wiki.sa-mp.com/wiki/OnDialogResponse)

Here's a little online pawn-ish kit which you can use. (I used that to make that pawn line above^^)

https://app.pawnokit.ru/en/tools/createdialog.html

Easy, but don;t expect us to write enormous amount of lines

CalvinC
01/04/2015, 02:48 PM
Start off by showing the dialog in OnPlayerConnect:
http://wiki.sa-mp.com/wiki/ShowPlayerDialog
It should be a DIALOG_STYLE_LIST ofc.
Then you can check what the player picks using listitem in OnDialogResponse:
http://wiki.sa-mp.com/wiki/OnDialogResponse

Read those 2 wiki articles, there's also examples.