22.03.2015, 00:15
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.
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; }