Код:
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf2>
#include <YSI/y_ini>
#include <YSI\y_commands>
#include <streamer>
#pragma tabsize 0
#define SCM SendClientMessage
#define COLOR_RED 0xD62F4E
#define COL_LIGHTBLUE "{1BD3E0}"
#define COL_RED "{D62F4E}"
#define COL_ORANGE "{E09B1B}"
#define COL_WHITE "{FFFFFF}"
#define DIALOG_JOB 1093
#define JOB_FILE "Jobs/%d.ini"
#define Player_File "Jobs/Player/%s.ini"
#define MAX_JOBS 20
#define MAX_CP 20
new bool:False = false, _S_T_R_[128];
#define SendFormatMSG(%0,%1,%2,%3)\
do{\
format(_S_T_R_, sizeof (_S_T_R_), (%2), %3);\
SendClientMessage((%0),(%1), _S_T_R_);\
}\
while (False)
#define randomEx(%0,%1) (random((%1) - (%0)) + (%0))
new
JobName[MAX_PLAYERS][64],
JobCP[MAX_PLAYERS],
JobID[MAX_PLAYERS],
PlayerCP[MAX_PLAYERS],
JobVehID[MAX_PLAYERS],
PlayerVeh[MAX_PLAYERS],
bool:PlayerWork[MAX_PLAYERS],
JobChoose[MAX_PLAYERS],
JobMin[MAX_PLAYERS],
JobMax[MAX_PLAYERS],
bool:PlayerCreateJob[MAX_PLAYERS],
bool:JobOnCP[MAX_PLAYERS],
Seller[MAX_PLAYERS],
Price[MAX_PLAYERS];
enum info
{
pJob,
}
new P_Data[MAX_PLAYERS][info];
enum jo
{
Float:TCPX,
Float:TCPY,
Float:TCPZ,
Name[64],
VehID,
Choosed,
Min,
Max,
Pickup,
Text3D:Label
}
new Job[MAX_JOBS][jo];
enum jobs
{
Float:CPX,
Float:CPY,
Float:CPZ,
}
new CheckPoint[MAX_JOBS][MAX_CP][jobs];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" InGame Job Maker by: Mr.Gagi (Gagi_Corleone)");
print("--------------------------------------\n");
for(new i = 1; i<=MAX_JOBS;i++)
{
new gFile[35],string[128];
format(gFile, 35, JOB_FILE ,i);
INI_ParseFile(gFile, "LoadJobs", .bExtra = true, .extra = i);
Job[i][Pickup] = CreateDynamicPickup(1239, 23, Job[i][TCPX],Job[i][TCPY],Job[i][TCPZ],-1,-1,-1,100.0);
format(string,128,""COL_LIGHTBLUE"To take job "COL_ORANGE"%s\n"COL_LIGHTBLUE"Type "COL_RED"[/takejob]",Job[i][Name]);
Job[i][Label] = CreateDynamic3DTextLabel(string, 0xFFFFFF, Job[i][TCPX],Job[i][TCPY],Job[i][TCPZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100);
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
print("\n----------------------------------");
print(" InGame Job Maker by: Mr.Gagi (Gagi_Corleone)");
print("----------------------------------\n");
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
Seller[playerid] = 999;
Price[playerid] = 0;
new pFile[48];
format(pFile, 48, Player_File, GetName(playerid));
if(!fexist(pFile))
{
new
INI:UserFile = INI_Open(pFile);
INI_WriteFloat(UserFile, "Job", 0);
INI_Close(UserFile);
}
INI_ParseFile(pFile, "LoadPlayerData", .bExtra = true, .extra = playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pFile[48];
format(pFile, 48, Player_File, GetName(playerid));
if(fexist(pFile))
{
new
INI:UserFile = INI_Open(pFile);
INI_WriteInt(UserFile, "Job", P_Data[playerid][pJob]);
INI_Close(UserFile);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
new cpid = PlayerCP[playerid];
new jobid = P_Data[playerid][pJob];
if(cpid >= 1)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,CheckPoint[jobid][cpid][CPX],CheckPoint[jobid][cpid][CPY],CheckPoint[jobid][cpid][CPZ]))
{
if(GetPlayerVehicleID(playerid) == PlayerVeh[playerid])
{
PlayerCP[playerid]++;
cpid = PlayerCP[playerid];
new money = randomEx(Job[jobid][Min],Job[jobid][Max]);
if(CheckPoint[jobid][cpid][CPX] == 0.0 && CheckPoint[jobid][cpid][CPY] == 0)//Last Checkpoint
{
if(Job[jobid][Choosed] == 2)
{
GivePlayerMoney(playerid,money);
SendFormatMSG(playerid,-1,"Dobili ste {E0941B}$%d",money);
PlayerCP[playerid] = 0;
DestroyVehicle(PlayerVeh[playerid]);
SCM(playerid,-1,"Zavrsili ste sa poslom!");
DisablePlayerCheckpoint(playerid); PlayerWork[playerid] = false;
return 1;
}
if(Job[jobid][Choosed] == 1){ PlayerCP[playerid] = 2; cpid = PlayerCP[playerid];}
}
SetPlayerCheckpoint(playerid,CheckPoint[jobid][cpid][CPX],CheckPoint[jobid][cpid][CPY],CheckPoint[jobid][cpid][CPZ],3.0);
GivePlayerMoney(playerid,money);
SendFormatMSG(playerid,-1,"Dobili ste {E0941B}$%d",money);
}
}
}
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
if(PlayerCreateJob[playerid])
{
if(JobCP[playerid] == 1)
{
new dFile[32],Float:Pos[3],string[128];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(dFile, 35, JOB_FILE, JobID[playerid]);
new
INI:File = INI_Open(dFile);
INI_WriteString(File, "Name", JobName[playerid]);
INI_WriteFloat(File, "TCPX", Pos[0]);
INI_WriteFloat(File, "TCPY", Pos[1]);
INI_WriteFloat(File, "TCPZ", Pos[2]);
INI_WriteInt(File, "Veh", JobVehID[playerid]);
INI_WriteInt(File, "Min", JobMin[playerid]);
INI_WriteInt(File, "Max", JobMax[playerid]);
INI_WriteInt(File, "Choose", JobChoose[playerid]);
INI_Close(File);
format(Job[JobID[playerid]][Name],64,"%s",JobName[playerid]);
Job[JobID[playerid]][TCPX] = Pos[0];
Job[JobID[playerid]][TCPY] = Pos[1];
Job[JobID[playerid]][TCPZ] = Pos[2];
Job[JobID[playerid]][VehID] = JobVehID[playerid];
Job[JobID[playerid]][Choosed] = JobChoose[playerid];
Job[JobID[playerid]][Min] = JobMin[playerid];
Job[JobID[playerid]][Max] = JobMax[playerid];
Job[JobID[playerid]][Pickup] = CreateDynamicPickup(1239, 23, Job[JobID[playerid]][TCPX],Job[JobID[playerid]][TCPY],Job[JobID[playerid]][TCPZ],-1,-1,-1,100.0);
format(string,128,""COL_LIGHTBLUE"Da se zaposlite kao "COL_ORANGE"%s\n"COL_LIGHTBLUE"Kucajte "COL_RED"[/takejob]",Job[JobID[playerid]][Name]);
Job[JobID[playerid]][Label] = CreateDynamic3DTextLabel(string, 0xFFFFFF, Job[JobID[playerid]][TCPX],Job[JobID[playerid]][TCPY],Job[JobID[playerid]][TCPZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100);
JobCP[playerid]++;
}
else if(JobCP[playerid] > 1)
{
new dFile[32],Float:Pos[3],string[6];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(dFile, 35, JOB_FILE, JobID[playerid]);
new
INI:File = INI_Open(dFile);
format(string,6,"CPX%d",JobCP[playerid]);
INI_WriteFloat(File, string, Pos[0]);
CheckPoint[JobID[playerid]][JobCP[playerid]][CPX] = Pos[0];
format(string,6,"CPY%d",JobCP[playerid]);
INI_WriteFloat(File, string, Pos[1]);
CheckPoint[JobID[playerid]][JobCP[playerid]][CPY] = Pos[1];
format(string,6,"CPZ%d",JobCP[playerid]);
INI_WriteFloat(File, string, Pos[2]);
CheckPoint[JobID[playerid]][JobCP[playerid]][CPZ] = Pos[2];
INI_Close(File);
JobCP[playerid]++;
}
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_JOB:
{
if(!response) return 1;
switch(listitem)
{
case 0://Checpoint
{
SCM(playerid,-1,"Izabrali ste posao sa checkpointima.");
ShowPlayerDialog(playerid,DIALOG_JOB+1,DIALOG_STYLE_INPUT,"Job Name","Ukucajte ime posla","Insert","Close");
JobOnCP[playerid] = true;
}
case 1://Checpoint
{
SCM(playerid,-1,"Izabrali ste posao sa komandama.");
ShowPlayerDialog(playerid,DIALOG_JOB+1,DIALOG_STYLE_INPUT,"Job Name","Ukucajte ime posla","Insert","Close");
JobOnCP[playerid] = false;
}
}
}
case DIALOG_JOB+1:
{
if(!response) return 1;
if(JobOnCP[playerid]) { JobCP[playerid] = 1; SCM(playerid,-1,"Da postavite checkpointe koristite levi klik. Prvi klik je za komandu /takejob");}
format(JobName[playerid],64,"%s",inputtext);
ShowPlayerDialog(playerid,DIALOG_JOB+2,DIALOG_STYLE_INPUT,"Job Veh","Unesite id vozila","Insert","Close");
}
case DIALOG_JOB+2:
{
if(!response) return 1;
SendFormatMSG(playerid,-1,"Izabrali ste vozilo id %d",strval(inputtext));
JobVehID[playerid] = strval(inputtext);
if(JobOnCP[playerid]) { ShowPlayerDialog(playerid,DIALOG_JOB+3,DIALOG_STYLE_INPUT,"Choose system","1 = Posle zadnjeg CP\npokrenuti ih opet\n2 = Posle zadnjeg CP\nzavrsiti posao\nUnesite 1 ili 2","Insert","Close"); }
if(!JobOnCP[playerid]) { ShowPlayerDialog(playerid,DIALOG_JOB+6,DIALOG_STYLE_INPUT,"Unesite komandu","Primer: sellicecream (bez /)","Insert","Close"); }
}
case DIALOG_JOB+3:
{
if(!response) return 1;
SendFormatMSG(playerid,-1,"Izabrali ste opciju %d",strval(inputtext));
JobChoose[playerid] = strval(inputtext);
ShowPlayerDialog(playerid,DIALOG_JOB+4,DIALOG_STYLE_INPUT,"Choose minimum","Unesite koliko je minimum para da se dobije na CP","Insert","Close");
}
case DIALOG_JOB+4:
{
if(!response) return 1;
SendFormatMSG(playerid,-1,"Uneli ste $%d za minimum para",strval(inputtext));
JobMin[playerid] = strval(inputtext);
ShowPlayerDialog(playerid,DIALOG_JOB+5,DIALOG_STYLE_INPUT,"Choose max","Unesite koliko je maximum para da se dobije na CP","Insert","Close");
}
case DIALOG_JOB+5:
{
if(!response) return 1;
SendFormatMSG(playerid,-1,"Uneli ste $%d za max para",strval(inputtext));
JobMax[playerid] = strval(inputtext);
}
case DIALOG_JOB+6:
{
if(!response) return 1;
new dFile[32],Float:Pos[3],string[200];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(dFile, 35, JOB_FILE, JobID[playerid]);
new
INI:File = INI_Open(dFile);
INI_WriteString(File, "Name", JobName[playerid]);
INI_WriteFloat(File, "TCPX", Pos[0]);
INI_WriteFloat(File, "TCPY", Pos[1]);
INI_WriteFloat(File, "TCPZ", Pos[2]);
INI_WriteInt(File, "Veh", JobVehID[playerid]);
INI_Close(File);
format(Job[JobID[playerid]][Name],64,"%s",JobName[playerid]);
Job[JobID[playerid]][TCPX] = Pos[0];
Job[JobID[playerid]][TCPY] = Pos[1];
Job[JobID[playerid]][TCPZ] = Pos[2];
Job[JobID[playerid]][VehID] = JobVehID[playerid];
Job[JobID[playerid]][Choosed] = JobChoose[playerid];
Job[JobID[playerid]][Min] = JobMin[playerid];
Job[JobID[playerid]][Max] = JobMax[playerid];
Job[JobID[playerid]][Pickup] = CreateDynamicPickup(1239, 23, Job[JobID[playerid]][TCPX],Job[JobID[playerid]][TCPY],Job[JobID[playerid]][TCPZ],-1,-1,-1,100.0);
format(string,128,""COL_LIGHTBLUE"Da se zaposlite kao "COL_ORANGE"%s\n"COL_LIGHTBLUE"Kucajte "COL_RED"[/takejob]",Job[JobID[playerid]][Name]);
Job[JobID[playerid]][Label] = CreateDynamic3DTextLabel(string, 0xFFFFFF, Job[JobID[playerid]][TCPX],Job[JobID[playerid]][TCPY],Job[JobID[playerid]][TCPZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100);
new File:log = fopen("/Command.txt", io_write);
format(string,sizeof(string),"YCMD:%s(playerid,params[],help)\r\n{\r\n#pragma unused help\r\n",inputtext);
fwrite(log, string);
format(string,sizeof(string),"if(P_Data[playerid][pJob] != %d) return SCM(playerid,COLOR_RED,\"EROR:\"COL_WHITE\"Vi nemate posao %s\");\r\n",JobID[playerid]);
fwrite(log, string);
format(string,sizeof(string),"new pplayerid,price,Float:Position[3];\r\nif(sscanf(params,\"ui\",pplayerid,price)) return SCM(playerid,COLOR_RED,\"\"COL_WHITE\"Koristite: /%s [ID igraca/Deo imena] [Cena]\");\r\n",inputtext);
fwrite(log, string);
fwrite(log, "if(!PlayerWork[playerid]) return SCM(playerid,COLOR_RED,\"EROR: \"COL_WHITE\"Kucajte /startjob\");\r\n");
fwrite(log, "if(PlayerVeh[playerid] != GetPlayerVehicleID(playerid)) return SCM(playerid,COLOR_RED,\"EROR: \"COL_WHITE\"Niste u svom vozilu\");\r\n");
fwrite(log, "if(pplayerid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_RED,\"EROR:\"COL_WHITE\"Invalid ID\");\r\n");
fwrite(log, "GetPlayerPos(pplayerid,Position[0],Position[1],Position[2]);\r\n");
fwrite(log, "if(!IsPlayerInRangeOfPoint(playerid,5.0,Position[0],Position[1],Position[2])) return SCM(playerid,COLOR_RED,\"EROR:\"COL_WHITE\"Niste blizu tog igraca\");\r\n");
fwrite(log, "Seller[pplayerid] = playerid;\r\nPrice[pplayerid] = price;\r\n");
format(string,sizeof(string),"SendFormatMSG(pplayerid,-1,\"Igrac sa poslom %s vam je ponudio nesto po ceni:",JobName[playerid]);
fwrite(log, string);
fwrite(log, " $%d kucajte /accept %s\",price,inputtext);\r\n");
fwrite(log, "SCM(playerid,-1,\"Sacekajte za igracev odgovor\");\r\n");
fwrite(log, "return 1;\r\n}\r\n==============U komandu /accept\r\n");
format(string,sizeof(string),"if(strcmp(text,\"%s\",false) == 0)\r\n{\r\n",inputtext);
fwrite(log, string);
fwrite(log, "if(Seller[playerid] == 999) return SCM(playerid,COLOR_RED,\"Niko vam nije nista ponudio\");\r\n");
fwrite(log, "if(Price[playerid] > GetPlayerMoney(playerid)) return SCM(playerid,COLOR_RED,\"Nemate dovoljno para\"),Seller[playerid] = 999;\r\n");
fwrite(log, "SCM(Seller[playerid],-1,\"Igrac je prihavtio ponudu\");\r\nSCM(playerid,-1,\"Prihvatili ste ponudu\");\r\n");
fwrite(log, "GivePlayerMoney(Seller[playerid],Price[playerid]);\r\nGivePlayerMoney(playerid,-Price[playerid]);\r\n");
fwrite(log, "new Float:health; GetPlayerHealth(playerid,health);\r\nSetPlayerHealth(playerid,health+25);\r\n");
fwrite(log, "}");
fclose(log); // Close the file
}
}
return 1;
}
forward LoadPlayerData(playerid, name[], value[]);
public LoadPlayerData(playerid, name[], value[])
{
INI_Int("Job", P_Data[playerid][pJob]);
return 1;
}
stock GetName(playerid)
{
new
pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
return pName;
}
forward GetJobID(playerid);
public GetJobID(playerid)
{
new Float:Distance;
for(new j = 1; j<MAX_JOBS; j++)
{
Distance = GetDistanceToJob(playerid, j);
if(Distance < 5.0)
{
return j;
}
}
return -1;
}
forward Float:GetDistanceToJob(playerid, j);
public Float:GetDistanceToJob(playerid, j)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
GetPlayerPos(playerid,x1,y1,z1);
x2 = Job[j][TCPX];
y2 = Job[j][TCPY];
z2 = Job[j][TCPZ];
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
forward LoadJobs(id, name[], value[]);
public LoadJobs(id, name[], value[])
{
new string[6];
INI_String("Name", Job[id][Name],64);
INI_Float("TCPX", Job[id][TCPX]);
INI_Float("TCPY", Job[id][TCPY]);
INI_Float("TCPZ", Job[id][TCPZ]);
INI_Int("Veh", Job[id][VehID]);
INI_Int("Min", Job[id][Min]);
INI_Int("Max", Job[id][Max]);
INI_Int("Choose", Job[id][Choosed]);
for(new i = 1;i <= MAX_CP;i++)
{
format(string,6,"CPX%d",i);
INI_Float(string, CheckPoint[id][i][CPX]);
format(string,6,"CPY%d",i);
INI_Float(string, CheckPoint[id][i][CPY]);
format(string,6,"CPZ%d",i);
INI_Float(string, CheckPoint[id][i][CPZ]);
}
return 1;
}
//========Commands=========
YCMD:createjob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new dFile[32];
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Morate biti RCON admin!");
if(PlayerCreateJob[playerid]) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vec praviti posao!");
ShowPlayerDialog(playerid,DIALOG_JOB,DIALOG_STYLE_LIST,"Posao baziran na","Checkpointima\nKomandama","Choose","Close");
JobID[playerid] = 1;
PlayerCreateJob[playerid] = true;
for(new id = 1; id <= MAX_JOBS;id++)
{
format(dFile, 35, JOB_FILE, id);
if(fexist(dFile)) JobID[playerid]++;
if(JobID[playerid] > MAX_JOBS) return SCM(playerid,-1,"Pomeriti MAX_JOBS u FS.");
}
return 1;
}
YCMD:finishcjob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Morate biti RCON admin!");
if(!PlayerCreateJob[playerid]) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vi ne praviti posao!");
JobID[playerid] = 0;
PlayerCreateJob[playerid] = false;
SCM(playerid,-1,"Zavrsili ste pravljenje posla.");
return 1;
}
YCMD:takejob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new id = GetJobID(playerid);
if(id == -1) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Nema nijedan posao u blizini.");
if(P_Data[playerid][pJob] != 0) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vi vec imate posao.");
SendFormatMSG(playerid,-1,"Zaposlili ste se kao {E0941B}%s",Job[id][Name]);
P_Data[playerid][pJob] = id;
return 1;
}
YCMD:startjob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(PlayerWork[playerid]) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vec ste poceli posao kucajte /finishjob");
new h = P_Data[playerid][pJob],Float:Pos[4]; GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid,Pos[3]);
if(P_Data[playerid][pJob] == 0) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vi nemate posao.");
if(!IsPlayerInRangeOfPoint(playerid,20.0,Job[h][TCPX],Job[h][TCPY],Job[h][TCPZ])) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Niste blizu svog posla.");
PlayerCP[playerid] = 2;
if(Job[h][Choosed] != 0) SetPlayerCheckpoint(playerid,CheckPoint[h][PlayerCP[playerid]][CPX],CheckPoint[h][PlayerCP[playerid]][CPY],CheckPoint[h][PlayerCP[playerid]][CPZ],3.0);
SCM(playerid,-1,"Poceli ste sa poslom idite na crveni checkpoint.");
PlayerVeh[playerid] = CreateVehicle(Job[h][VehID],Pos[0],Pos[1]+1,Pos[2],Pos[3],random(256),random(256),3600);
PlayerWork[playerid] = true;
return 1;
}
YCMD:finishjob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(!PlayerWork[playerid]) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Niste pokrenuli posao.");
if(P_Data[playerid][pJob] == 0) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Vi niste zaposljeni.");
PlayerCP[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SCM(playerid,-1,"Zavrsili ste sa poslom.");
DestroyVehicle(PlayerVeh[playerid]);
PlayerWork[playerid] = false;
return 1;
}
YCMD:quitjob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(PlayerWork[playerid]) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Prvo zavrsite sa poslom.");
if(P_Data[playerid][pJob] == 0) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"Nemate posao.");
SCM(playerid,-1,"Dali ste otkaz.");
P_Data[playerid][pJob] = 0;
return 1;
}
YCMD:accept(playerid,params[],help)
{
#pragma unused help
new text[48];
if(sscanf(params,"s[48]",text)) return SCM(playerid,-1,"/accept [Ponudjeno]");
/*
Ostalo iz command.txt
*/
return 1;
}