SA-MP Forums Archive
[FilterScript] Light Role Play Job System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Light Role Play Job System (/showthread.php?tid=568414)



Light Role Play Job System - DRP - 22.03.2015

Hello people, I've been trying to script something, to show myself I can script something, so I tried to make a Job System for Light Role Play, details will be shown below, but I recommend you to use it for Light Role Play. NOTE: THIS IS MY FIRST SCRIPT I'VE EVER SUCCED


Using this script for Medium-High Role Play wouldn't be RECOMMENDED!

There's only two jobs, which are:Taxi Driver and Gun Dealer

Gun Dealer's Job: /arms /deagle /shotgun

Taxi Driver's Job:/taxi /work


This is also recommended for freeroam servers.

I know it's kinda shitty, but I think it's good enough for light roleplay or freeroams, no hate please.
Код:
#include <a_samp>
#include <zcmd>

#define COLOR_YELLOW 	  0xFFFF00AA
#define WEAPONSKILL_DESERT_EAGLE		2
#define WEAPONSKILL_SHOTGUN				3

#if defined players_included
	#endinput
#endif
#define players_included
#pragma library players

new pTeam[MAX_PLAYERS]; // The variable storing a player's team

#define team_gun   1 // team for arms dealer
#define team_taxi   2 // team to design taxi drivers
#define team_civil   4 // team to design normal players


CMD:jobs(playerid,params[])
{
	SendClientMessage(playerid, COLOR_YELLOW, "Taxi Job - /taxi, Gun Dealer Job - /arms, ");
	return 1;
}

CMD:gunhelp(playerid,params[])
{
	pTeam[playerid] = team_gun;
	SendClientMessage(playerid, COLOR_YELLOW, "/deagle /shotgun");
	return 1;
}

CMD:arms(playerid,params[])
{
	pTeam[playerid] = team_gun;
	SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You are now a gun dealer, /quitjob to leave");
	return 1;
}

CMD:deagle(playerid,params[])
{
	if(pTeam[playerid] == team_gun)
	SendClientMessage(playerid, COLOR_YELLOW, "You gave out a deagle!");
	GivePlayerWeapon(playerid, 24, 100);
	return 1;
}

CMD:shotgun(playerid,params[])
{
	if(pTeam[playerid] == team_gun)
	SendClientMessage(playerid, COLOR_YELLOW, "You gave out a shotgun!");
	GivePlayerWeapon(playerid, 25, 100);
	return 1;
}

CMD:taxihelp(playerid,params[])
{
	pTeam[playerid] = team_taxi;
	SendClientMessage(playerid, COLOR_YELLOW, "/taxi");
	return 1;
}

CMD:taxi(playerid,params[])
{
	pTeam[playerid] = team_taxi;
	SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You are now a taxi driver, /quitjob to leave");
	return 1;
}

CMD:work(playerid,params[])
{
	if(pTeam[playerid] == team_taxi)
	SendClientMessage(playerid, COLOR_YELLOW, "You started the work fare, you got 200$ now!");
	GivePlayerMoney(playerid,200);
	return 1;
}

CMD:quitjob(playerid,params[])
{
	pTeam[playerid] = team_civil;
	SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You just quitted your job!");
	return 1;
}



Re: Light Role Play Job System - WardenCS - 22.03.2015

I'll suggest you to remove player's money when his gun dealer, or that command would be abused in any server

also for quitjob
Код:
CMD:quitjob(playerid,params[])
{
if(pTeam[playerid] != 4)
{
	pTeam[playerid] = team_civil;
	SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You just quitted your job!");
}
else
{
SendClientMessage(playerid,0xBFC0C2FF,"You don't have a job!");
}
return 1;
}
So you need to work before you can quit a job

But the filterscript is okay, just needs a unique idea.


Re: Light Role Play Job System - DRP - 22.03.2015

Thanks, will be look at!


Re: Light Role Play Job System - Wolfe - 22.03.2015

Quote:
Originally Posted by DRP
Посмотреть сообщение
Thanks, will be look at!
Looks alright could use some adjustments but ye alright


Re: Light Role Play Job System - Sellize - 22.03.2015

This is pretty bad since taxi drivers could easily spam their command to gain infinite money and arms dealers can get infinite weapons. Would NEVER use this for roleplay.