Szaisztok van 1 módom ami nem zcmdvel irodott és hozzáadtam dcmd és zcmd filterscripteket. Feltöltöttem FTPre és belépek a szerora majd leáll amikor betöltöm a filterscripteket.
Szerintem erre az a megoldás hogy átirni õket simára de nem tudom hogyan.
Ittvannak:
/*
gCamera - Speedcamera in SA-MP WITH FLASH EFFECT!
V1.1 - Released on 10-04-2011 (Updated at 12-04-2011)
Filterscript version with ingame speedcam generator!
©Gamer931215
I want to thank my friend HighFlyer in this release for some tips and testing it (like textlabels, using a streamer, etc) !
Use at own risk, do NOT re-release,mirror,sell it or even worse: clame this as your own!
*/
#include <a_samp>
#include <zcmd>
#include <YSI/y_ini>
//===================================================================================================
// Settings
//===================================================================================================
// SETTING: VALUE: Discription:
#define CAMERA_LIMIT 100 //Max loaded cameras (keep this as low as possible for the best performance)
#define CAMERA_UPDATE_INTERVAL 750 //update interval of all speedcams (in miliseconds)
#define CAMERA_FLASH_TIME 1200 //ammount of miliseconds until the \"flash\" effect gets removed again
#define CAMERA_DIALOG_RANGE 1337 //dialog ID range (Example: 0 will take dialogid\'s 0 - 9)
#define CAMERA_USEMPH 0 //toggles camera using mph by default (0=kmh, 1=mph)
#define CAMERA_LABEL_COLOR 0xFF000FFF //The default color of the camera\'s label
#define CAMERA_PERSPECTIVE false //Sets playercamera temporary at the camera\'s position while flashing
//streamer options (will be used if STREAMER_ENABLED is set on true)
#define STREAMER_ENABLED false //uses a streamer (true/false)
#define STREAMER_ADD CreateDynamicObject //put here at the value the command your streamer uses to make an object (CreateDynamicObject by default)
#define STREAMER_REMOVE DestroyDynamicObject //put here at the value the command your streamer uses to remove an object (STREAMER_REMOVE by default)
#if STREAMER_ENABLED == true //ignore this line
#include streamer //put your include name here
#endif //ignore this line
//===================================================================================================
// Variables
//===================================================================================================
#define DIALOG_MAIN CAMERA_DIALOG_RANGE
#define DIALOG_RANGE CAMERA_DIALOG_RANGE +1
#define DIALOG_LIMIT CAMERA_DIALOG_RANGE +2
#define DIALOG_FINE CAMERA_DIALOG_RANGE +3
#define DIALOG_EDIT CAMERA_DIALOG_RANGE +4
#define DIALOG_EANGLE CAMERA_DIALOG_RANGE +5
#define DIALOG_ELIMIT CAMERA_DIALOG_RANGE +6
#define DIALOG_ERANGE CAMERA_DIALOG_RANGE +7
#define DIALOG_EFINE CAMERA_DIALOG_RANGE +8
#define DIALOG_ETYPE CAMERA_DIALOG_RANGE +9
#define DIALOG_LABEL CAMERA_DIALOG_RANGE +10
#define COLOR_RED 0xFF1E00FF
#define COLOR_GREEN 0x05FF00FF
enum _camera
{Float:_x,Float:_y,Float:_z,Float:_rot,_range,_limit,_fine,_usemph,_objectid,bool:_active,bool:_activelabel,_labeltxt[128],Text3D:_label}
new SpeedCameras[CAMERA_LIMIT][_camera],loaded_cameras = 0,Text:flash;
//stocks for attaching labels to camera (must be defined before use, thats why this one is at the top)
stock Text3D:AttachLabelToCamera(cameraid,text[])
{
new position,buffer[128];format(buffer,sizeof buffer,\"%s\",text);
for(new i = 0;strfind(buffer,\"\\\\n\",true) != -1;i++)
{
position = strfind(buffer,\"\\\\n\",true);
strdel(buffer,position,position +2);
strins(buffer,\"\\r\\n\",position,sizeof(buffer));
}
return Create3DTextLabel(buffer,CAMERA_LABEL_COLOR,SpeedCameras[cameraid][_x],SpeedCameras[cameraid][_y],SpeedCameras[cameraid][_z] +7,100,0,0);
}
stock UpdateCameraLabel(Text3D:labelid,text[])
{
new position,buffer[128];format(buffer,sizeof buffer,\"%s\",text);
for(new i = 0;strfind(buffer,\"\\\\n\",true) != -1;i++)
{
position = strfind(buffer,\"\\\\n\",true);
strdel(buffer,position,position +2);
strins(buffer,\"\\r\\n\",position,sizeof(buffer));
}
return Update3DTextLabelText(labelid,CAMERA_LABEL_COLOR,buffer);
}
//===================================================================================================
// Initialize
//===================================================================================================
public OnFilterScriptInit()
{
SetTimer(\"UpdateCameras\",CAMERA_UPDATE_INTERVAL,true);
flash = TextDrawCreate(-20.000000,2.000000,\"|\");
TextDrawUseBox(flash,1);
TextDrawBoxColor(flash,0xffffff66);
TextDrawTextSize(flash,660.000000,22.000000);
TextDrawAlignment(flash,0);
TextDrawBackgroundColor(flash,0x000000ff);
TextDrawFont(flash,3);
TextDrawLetterSize(flash,1.000000,52.200000);
TextDrawColor(flash,0xffffffff);
TextDrawSetOutline(flash,1);
TextDrawSetProportional(flash,1);
TextDrawSetShadow(flash,1);
print(\"====================================\");
print(\"| gCamera V1.0 |\");
print(\"| ©Gamer931215 |\");
print(\"====================================\");
print(\"Initializing...\");
LoadCameras();
return 1;
}
public OnFilterScriptExit()
{
print(\"====================================\");
print(\"| gCamera V1.0 |\");
print(\"| ©Gamer931215 |\");
print(\"====================================\");
RemoveCameras();
print(\"All cameras have been removed.\");
return 1;
}
//===================================================================================================
// Commands
//===================================================================================================
COMMAND:gcam(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
ShowPlayerDialog(playerid,DIALOG_MAIN,DIALOG_STYLE_LIST,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Main menu\",\"{37FF00}Create speedcamera\\n\\nGet closest speedcamera ID\\nEdit closest speedcamera\\n{FF1400}Delete closest speedcamera\\n{FF1400}Delete all speedcameras\",\"OK\",\"Cancel\");
return 1;
}
//===================================================================================================
// Callbacks
//===================================================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(!response) {
DeletePVar(playerid,\"range\");
DeletePVar(playerid,\"limit\");
DeletePVar(playerid,\"fine\");
DeletePVar(playerid,\"selected\");
return 1;
}
switch(dialogid)
{
//======================================================
// Main menu
//======================================================
case DIALOG_MAIN:
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,\"Insert a range\",\"Please insert a range (recommended: 20-30)\",\"OK\",\"Cancel\");
case 1:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,COLOR_RED,\"No nearby cameras found!\");
SendClientMessageEx(playerid,COLOR_GREEN,\"sis\",\"The closest cameraID is ID: \",cam,\".\");
}
case 2:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,COLOR_RED,\"No nearby cameras found!\");
SetPVarInt(playerid,\"selected\",cam);
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor\",\"Change angle\\nChange range\\nChange speedlimit\\nChange fine\\nToggle mph mode\\nAdd/Remove/Edit textlabel\\n{FF1400}Delete camera\",\"OK\",\"Cancel\");
}
case 3:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,COLOR_RED,\"No nearby cameras found!\");
DestroySpeedCam(cam);
SendClientMessage(playerid,COLOR_GREEN,\"Camera has been removed.\");
DeletePVar(playerid,\"selected\");
}
case 4:
{
for(new i = 0;i<loaded_cameras +1;i++)
{
if(SpeedCameras[_active] == true)
{
DestroySpeedCam(i);
}
}
SendClientMessage(playerid,COLOR_GREEN,\"All speedcameras have been removed.\");
}
}
}
//======================================================
// Making a speedcam
//======================================================
case DIALOG_RANGE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,\"Insert a range\",\"Please insert a range (recommended: 20-30)\",\"OK\",\"Cancel\");
SetPVarInt(playerid,\"range\",strval(inputtext));
ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,\"Insert a speedlimit\",\"Please insert a speedlimit\",\"OK\",\"Cancel\");
}
case DIALOG_LIMIT:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,\"Insert a speedlimit\",\"Please insert a speedlimit\",\"OK\",\"Cancel\");
SetPVarInt(playerid,\"limit\",strval(inputtext));
ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,\"Insert a fine\",\"Please insert a fine\",\"OK\",\"Cancel\");
}
case DIALOG_FINE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,\"Insert a fine\",\"Please insert a fine\",\"OK\",\"Cancel\");
SetPVarInt(playerid,\"fine\",strval(inputtext));
new Float:x,Float:y,Float:z,Float:angle;
GetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,angle);
angle = angle + 180;if(angle > 360){angle = angle - 360;}
new id = CreateSpeedCam(x,y,z -3,angle,GetPVarInt(playerid,\"range\"),GetPVarInt(playerid,\"limit\"),GetPVarInt(playerid,\"fine\"),CAMERA_USEMPH);
SetPlayerPos(playerid,x,y+2,z);
DeletePVar(playerid,\"range\");
DeletePVar(playerid,\"limit\");
DeletePVar(playerid,\"fine\");
SetPVarInt(playerid,\"selected\",id);
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor\",\"Change angle\\nChange range\\nChange speedlimit\\nChange fine\\nToggle mph mode\\nAdd/Remove/Edit textlabel\\n{FF1400}Delete camera\",\"OK\",\"Cancel\");
}
//======================================================
// Edit menu
//======================================================
case DIALOG_EDIT:
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Angle\",\"Please enter a new angle\",\"OK\",\"Cancel\");
case 1: ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Range\",\"Please enter a new range\",\"OK\",\"Cancel\");
case 2: ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Speedlimit\",\"Please enter a new speedlimit\",\"OK\",\"Cancel\");
case 3: ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Fine\",\"Please enter a new fine\",\"OK\",\"Cancel\");
case 4: ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Mph/Kmh\",\"enter 1 to use mph and 0 for kmh\",\"OK\",\"Cancel\");
case 5: ShowPlayerDialog(playerid,DIALOG_LABEL,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Textlabel\",\"Please fill in the text you want to attach, or leave it empty to remove an existing label!\",\"OK\",\"Cancel\");
case 6:
{
DestroySpeedCam(GetPVarInt(playerid,\"selected\"));
SendClientMessage(playerid,COLOR_GREEN,\"Camera has been removed.\");
DeletePVar(playerid,\"selected\");
}
}
}
//======================================================
// Editing a speedcam
//======================================================
case DIALOG_EANGLE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Angle\",\"Please enter a new angle\",\"OK\",\"Cancel\");
new id = GetPVarInt(playerid,\"selected\");
new rot = strval(inputtext);
rot = rot + 180;
if (rot > 360)
{
rot = rot - 360;
}
SpeedCameras[id][_rot] = rot;
SetObjectRot(SpeedCameras[id][_objectid],0,0,rot);
SaveCamera(id);
SendClientMessageEx(playerid,COLOR_GREEN,\"sisis\",\"The angle of cameraID \",id,\" has succesfully been updated to \",strval(inputtext),\".\");
}
case DIALOG_ERANGE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Range\",\"Please enter a new range\",\"OK\",\"Cancel\");
new id = GetPVarInt(playerid,\"selected\");
SpeedCameras[id][_range] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,COLOR_GREEN,\"sisis\",\"The range of cameraID \",id,\" has succesfully been updated to \",strval(inputtext),\".\");
}
case DIALOG_ELIMIT:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Speedlimit\",\"Please enter a new Speedlimit\",\"OK\",\"Cancel\");
new id = GetPVarInt(playerid,\"selected\");
SpeedCameras[id][_limit] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,COLOR_GREEN,\"sisis\",\"The speedlimit of cameraID \",id,\" has succesfully been updated to \",strval(inputtext),\".\");
}
case DIALOG_EFINE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Fine\",\"Please enter a new fine\",\"OK\",\"Cancel\");
new id = GetPVarInt(playerid,\"selected\");
SpeedCameras[id][_fine] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,COLOR_GREEN,\"sisis\",\"The fine of cameraID \",GetPVarInt(playerid,\"selected\"),\" has succesfully been updated to \",strval(inputtext),\".\");
}
case DIALOG_ETYPE:
{
if(!strlen(inputtext) || strval(inputtext) != 0 && strval(inputtext) != 1) return ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,\"{00A5FF}gCamera {FFFFFF}- {FFDC00}Editor - Mph/Kmh\",\"enter 1 to use mph and 0 for kmh\",\"OK\",\"Cancel\");
new id = GetPVarInt(playerid,\"selected\");
SpeedCameras[id][_usemph] = strval(inputtext);
if(strval(inputtext) == 1)
{
SendClientMessageEx(playerid,COLOR_GREEN,\"sis\",\"CameraID \",GetPVarInt(playerid,\"selected\"),\" does now meassure speed in mph.\");
} else {
SendClientMessageEx(playerid,COLOR_GREEN,\"sis\",\"CameraID \",GetPVarInt(playerid,\"selected\"),\" does now meassure speed in kmh.\");
}
}
case DIALOG_LABEL:
{
new id = GetPVarInt(playerid,\"selected\");
if(!strlen(inputtext))
{
if(SpeedCameras[id][_activelabel] == true)
{
Delete3DTextLabel(SpeedCameras[id][_label]);
SpeedCameras[id][_activelabel] = false;
SpeedCameras[id][_labeltxt] = 0;
}
SendClientMessageEx(playerid,COLOR_GREEN,\"sis\",\"The textlabel of cameraID \",GetPVarInt(playerid,\"selected\"),\" has succesfully been removed.\");
} else {
if(SpeedCameras[id][_activelabel] == true)
{
format(SpeedCameras[id][_labeltxt],128,\"%s\",inputtext);
UpdateCameraLabel(SpeedCameras[id][_label],inputtext);
} else {
SpeedCameras[id][_activelabel] = true;
format(SpeedCameras[id][_labeltxt],128,\"%s\",inputtext);
SpeedCameras[id][_label] = AttachLabelToCamera(id,inputtext);
}
SendClientMessageEx(playerid,COLOR_GREEN,\"sisss\",\"The textlabel of cameraID \",GetPVarInt(playerid,\"selected\"),\" has succesfully been updated to \",inputtext,\".\");
}
SaveCamera(id);
}
}
return 0;
}
//===================================================================================================
// Functions
//===================================================================================================
stock LoadCameras()
{
new file[64];
for(new i = 0;i<CAMERA_LIMIT;i++)
{
format(file,sizeof file,\"/SpeedCameras/%i.txt\",i);
if(fexist(file))
{
INI_ParseFile(file,\"LoadCam\",.bExtra = true,.extra = i);
#if STREAMER_ENABLED == true
SpeedCameras[_objectid] = STREAMER_ADD(18880,SpeedCameras[_x],SpeedCameras[_y],SpeedCameras[_z],0,0,SpeedCameras[_rot]);
#else
SpeedCameras[_objectid] = CreateObject(18880,SpeedCameras[_x],SpeedCameras[_y],SpeedCameras[_z],0,0,SpeedCameras[_rot]);
#endif
SpeedCameras[_active] = true;
if(SpeedCameras[_activelabel] == true)
{
SpeedCameras[_label] = AttachLabelToCamera(i,SpeedCameras[_labeltxt]);
}
loaded_cameras++;
}
}
printf(\"gCamera has succesfully loaded %i camera(s).\",loaded_cameras);
}
forward LoadCam(cameraid,name[],value[]);
public LoadCam(cameraid,name[],value[])
{
INI_Float(\"_x\",SpeedCameras[cameraid][_x]);
INI_Float(\"_y\",SpeedCameras[cameraid][_y]);
INI_Float(\"_z\",SpeedCameras[cameraid][_z]);
INI_Float(\"_rot\",SpeedCameras[cameraid][_rot]);
INI_Int(\"_range\",SpeedCameras[cameraid][_range]);
INI_Int(\"_limit\",SpeedCameras[cameraid][_limit]);
INI_Int(\"_fine\",SpeedCameras[cameraid][_fine]);
INI_Int(\"_usemph\",SpeedCameras[cameraid][_usemph]);
INI_Bool(\"_activelabel\",SpeedCameras[cameraid][_activelabel]);
INI_String(\"_labeltxt\",SpeedCameras[cameraid][_labeltxt],128);
return 1;
}
stock RemoveCameras()
{
for(new i = 0;i<loaded_cameras +1;i++)
{
if(SpeedCameras[_active] == true)
{
#if STREAMER_ENABLED == true
STREAMER_REMOVE(SpeedCameras[_objectid]);
#else
DestroyObject(SpeedCameras[_objectid]);
#endif
if(SpeedCameras[_activelabel] == true)
{
Delete3DTextLabel(SpeedCameras[_label]);
}
}
}
return 1;
}
stock generate_id()
{
new file[64];
for(new i = 0;i<CAMERA_LIMIT;i++)
{
format(file,sizeof file,\"/SpeedCameras/%i.txt\",i);
if(!fexist(file)) return i;
}
return -1;
}
stock CreateSpeedCam(Float:x,Float:y,Float:z,Float:rot,range,limit,fine,use_mph = 0)
{
new newid = generate_id();
if(newid == -1)
{
print(\"gSpeedcam: ERROR! Cannot create speedcam, max ammount of speedcameras has been reached!\");
return 1;
}
if (newid == loaded_cameras || newid > loaded_cameras)
{
loaded_cameras++;
}
SpeedCameras[newid][_x] = x;
SpeedCameras[newid][_y] = y;
SpeedCameras[newid][_z] = z;
SpeedCameras[newid][_rot] = rot;
SpeedCameras[newid][_range] = range;
SpeedCameras[newid][_limit] = limit;
SpeedCameras[newid][_fine] = fine;
SpeedCameras[newid][_usemph] = use_mph;
#if STREAMER_ENABLED == true
SpeedCameras[newid][_objectid] = STREAMER_ADD(18880,x,y,z,0,0,rot);
#else
SpeedCameras[newid][_objectid] = CreateObject(18880,x,y,z,0,0,rot);
#endif
SpeedCameras[newid][_active] = true;
SpeedCameras[newid][_activelabel] = false;
SpeedCameras[newid][_labeltxt] = 0;
new file[64];format(file,sizeof file,\"/SpeedCameras/%i.txt\",newid);
new INI:handler = INI_Open(file);
INI_WriteFloat(handler,\"_x\",SpeedCameras[newid][_x]);
INI_WriteFloat(handler,\"_y\",SpeedCameras[newid][_y]);
INI_WriteFloat(handler,\"_z\",SpeedCameras[newid][_z]);
INI_WriteFloat(handler,\"_rot\",SpeedCameras[newid][_rot]);
INI_WriteInt(handler,\"_range\",SpeedCameras[newid][_range]);
INI_WriteInt(handler,\"_limit\",SpeedCameras[newid][_limit]);
INI_WriteInt(handler,\"_fine\",SpeedCameras[newid][_fine]);
INI_WriteInt(handler,\"_usemph\",SpeedCameras[newid][_usemph]);
INI_WriteBool(handler,\"_activelabel\",SpeedCameras[newid][_activelabel]);
INI_WriteString(handler,\"_labeltxt\",SpeedCameras[newid][_labeltxt]);
INI_Close(handler);
return newid;
}
stock SaveCamera(cameraid)
{
new file[64];format(file,sizeof file,\"/SpeedCameras/%i.txt\",cameraid);
new INI:handler = INI_Open(file);
INI_WriteFloat(handler,\"_x\",SpeedCameras[cameraid][_x]);
INI_WriteFloat(handler,\"_y\",SpeedCameras[cameraid][_y]);
INI_WriteFloat(handler,\"_z\",SpeedCameras[cameraid][_z]);
INI_WriteFloat(handler,\"_rot\",SpeedCameras[cameraid][_rot]);
INI_WriteInt(handler,\"_range\",SpeedCameras[cameraid][_range]);
INI_WriteInt(handler,\"_limit\",SpeedCameras[cameraid][_limit]);
INI_WriteInt(handler,\"_fine\",SpeedCameras[cameraid][_fine]);
INI_WriteInt(handler,\"_usemph\",SpeedCameras[cameraid][_usemph]);
INI_WriteBool(handler,\"_activelabel\",SpeedCameras[cameraid][_activelabel]);
INI_WriteString(handler,\"_labeltxt\",SpeedCameras[cameraid][_labeltxt]);
INI_Close(handler);
}
stock DestroySpeedCam(cameraid)
{
SpeedCameras[cameraid][_active] = false;
#if STREAMER_ENABLED == true
STREAMER_REMOVE(SpeedCameras[cameraid][_objectid]);
#else
DestroyObject(SpeedCameras[cameraid][_objectid]);
#endif
if(SpeedCameras[cameraid][_activelabel] == true)
{
Delete3DTextLabel(SpeedCameras[cameraid][_label]);
}
SpeedCameras[cameraid][_activelabel] = false;
SpeedCameras[cameraid][_labeltxt] = 0;
new file[64];format(file,sizeof file,\"/SpeedCameras/%i.txt\",cameraid);
if(fexist(file)){fremove(file);}
return 1;
}
stock SetSpeedCamRange(cameraid,limit)
{
SpeedCameras[cameraid][_limit] = limit;
return 1;
}
stock SetSpeedCamFine(cameraid,fine)
{
SpeedCameras[cameraid][_fine] = fine;
return 1;
}
stock Float:GetDistanceBetweenPoints(Float:x,Float:y,Float:tx,Float:ty)
{
new Float:temp1, Float:temp2;
temp1 = x-tx;temp2 = y-ty;
return floatsqroot(temp1*temp1+temp2*temp2);
}
stock GetClosestCamera(playerid)
{
new Float:distance = 10,Float:temp,Float:x,Float:y,Float:z,current = -1;GetPlayerPos(playerid,x,y,z);
for(new i = 0;i<loaded_cameras +1;i++)
{
if(SpeedCameras[_active] == true)
{
temp = GetDistanceBetweenPoints(x,y,SpeedCameras[_x],SpeedCameras[_y]);
if(temp < distance)
{
distance = temp;
current = i;
}
}
}
return current;
}
stock Float:GetVehicleSpeed(vehicleid,UseMPH = 0)
{
new Float:speed_x,Float:speed_y,Float:speed_z,Float:temp_speed;
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
if(UseMPH == 0)
{
temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
} else {
temp_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
}
floatround(temp_speed,floatround_round);return temp_speed;
}
stock SendClientMessageEx(playerid,color,type[],{Float,_}:...)
{
new string[128];
for(new i = 0;i<numargs() -2;i++)
{
switch(type)
{
case \'s\':
{
new result[128];
for(new a= 0;getarg(i +3,a) != 0;a++)
{
result[a] = getarg(i +3,a);
}
if(!strlen(string))
{
format(string,sizeof string,\"%s\",result);
} else format(string,sizeof string,\"%s%s\",string,result);
}
case \'i\':
{
new result = getarg(i +3);
if(!strlen(string))
{
format(string,sizeof string,\"%i\",result);
} else format(string,sizeof string,\"%s%i\",string,result);
}
case \'f\':
{
new Float:result = Float:getarg(i +3);
if(!strlen(string))
{
format(string,sizeof string,\"%f\",result);
} else format(string,sizeof string,\"%s%f\",string,result);
}
}
}
SendClientMessage(playerid,color,string);
return 1;
}
//===================================================================================================
// Timers
//===================================================================================================
forward UpdateCameras();
public UpdateCameras()
{
for(new a = 0;a<MAX_PLAYERS;a++)
{
if(!IsPlayerConnected(a)) continue;
if(!IsPlayerInAnyVehicle(a)) continue;
if(GetPVarInt(a,\"PlayerHasBeenFlashed\") == 1)
{
continue;
} else if (GetPVarInt(a,\"PlayerHasBeenFlashed\") == 2)
{
DeletePVar(a,\"PlayerHasBeenFlashed\");
continue;
}
for(new b = 0;b<loaded_cameras +1;bö+)
{
if(SpeedCameras[_active] == false) continue;
if(IsPlayerInRangeOfPoint(a,SpeedCameras[_range],SpeedCameras[_x],SpeedCameras[_y],SpeedCameras[_z]))
{
new speed = floatround(GetVehicleSpeed(GetPlayerVehicleID(a),SpeedCameras[_usemph]));
new limit = SpeedCameras[_limit];
if(speed > limit)
{
TextDrawShowForPlayer(a,flash);
#if CAMERA_PERSPECTIVE == true
SetPlayerCameraPos(a,SpeedCameras[_x],SpeedCameras[_y],SpeedCameras[_z] + 5);
new Float:x,Float:y,Float:z;GetPlayerPos(a,x,y,z);
SetPlayerCameraLookAt(a,x,y,z);
#endif
SetPVarInt(a,\"PlayerHasBeenFlashed\",1);
SetTimerEx(\"RemoveFlash\",CAMERA_FLASH_TIME,false,\"i\",a);
if(GetPlayerState(a) == PLAYER_STATE_DRIVER)
{
if(SpeedCameras[_usemph] == 0)
{
SendClientMessageEx(a,0xFF1E00FF,\"sisis\",\"?? ? ?!??\",speed,\"kmh ,? ?? ? ??.?? ?? ?? \",limit, \"kmh.\");
SendClientMessageEx(a,0xFF1E00FF,\"sis\",\"?? ? ?? $\",SpeedCameras[_fine],\".\");
} else {
SendClientMessageEx(a,0xFF1E00FF,\"sisis\",\"?? ? ?!?? \",speed,\"mph ? ?? ? ?? \",limit, \"mph.\");
SendClientMessageEx(a,0xFF1E00FF,\"sis\",\"?? ? ?? $\",SpeedCameras[_fine],\".\");
}
GivePlayerMoney(a, - SpeedCameras[_fine]);
}
}
}
}
}
}
forward RemoveFlash(playerid);
public RemoveFlash(playerid)
{
TextDrawHideForPlayer(playerid,flash);
SetPVarInt(playerid,\"PlayerHasBeenFlashed\",2);
#if CAMERA_PERSPECTIVE == true
SetCameraBehindPlayer(playerid);
#endif
}
// PPC Trucking házrendszer
//
// Készítette: PowerPC603
//
// A szkriptet ScreaM fordította a Magyar SA-MP Közösség számára!
//
// WWW.SAMPFORUM.HU
#pragma tabsize 0
#include <a_samp>
#include <zcmd>
#include <dutils>
#include <sscanf2>
#include <streamer>
#pragma unused ret_memcpy
// ******************************************************************************************************************************
// A beállítások módosíthatóak
// ******************************************************************************************************************************
// Set timer-delay for exiting houses (this timer freezes a player when he exits a house, this allows the game to load the environment
// before the player starts to fall, also the player\'s vehicles assigned to the house he exits from, are respawned by this timer)
new ExitHouseTimer = 1000;
// This allows you to toggle the red houses on the map (bought houses appear on the map as red house icons when this is set to \"true\")
// Setting this to \"false\" doesn\'t show a bought house on the map
new bool:ShowBoughtHouses = false;
// Setting this to \"true\" will load all vehicles assigned to houses when the filterscript loads
// Setting this to \"false\" will load the vehicles assigned to a house when the house-owner logs in (they\'ll also disappear when he logs out)
// Recommended setting for popular servers (with alot of players): \"false\"
// In popular servers, the amount of cars could go over the samp-limit (2000), bugging everything when all cars stay loaded
// even when the owner of the vehicle is offline
new bool:LoadCarsDuringFSInit = false;
// Setting this to \"true\" will set all houses to have insurance by default
// Seting this to \"false\" required players to buy insurance for their vehicles from within the house
// If players don\'t have insurance, their vehicle will be gone forever if it\'s destroyed
// If players have insurance, they will get their vehicle back when it\'s destroyed
new bool:AutomaticInsurance = true;
// Default max number of players is set to 500, re-define it to 50
#undef MAX_PLAYERS
#define MAX_PLAYERS 50
// Define housing parameters
#define MAX_HOUSES 2000 // Defines the maximum number of houses that can be created
#define MAX_HOUSESPERPLAYER 20 // Defines the maximum number of houses that any player can own (useable values: 1 to 20)
#define HouseUpgradePercent 100 // Defines the percentage for upgrading a house (house of 10m can be upgraded for 5m when set to 50)
#define ParkRange 150.0 // Defines the range for parking the vehicle around the house to which it belongs (default = 150m)
// Define path to house-files and player-files
#define HouseFile \"PPC_Housing/House%i.ini\"
// Define Dialogs
#define DialogHouseMenu 5001
#define DialogUpgradeHouse 5002
#define DialogGoHome 5003
#define DialogHouseNameChange 5004
#define DialogSellHouse 5005
#define DialogBuyCarClass 5006
#define DialogBuyCar 5007
#define DialogSellCar 5008
#define DialogBuyInsurance 5009
#define DialogGetCarSelectHouse 5010
#define DialogGetCarSelectCar 5011
// Define vehicle-classes
#define VClassBike 1
#define VClassBoat 2
#define VClassConvertible 3
#define VClassHelicopter 4
#define VClassIndustrial 5
#define VClassLowRider 6
#define VClassOffRoad 7
#define VClassPlane 8
#define VClassPublic 9
#define VClassRCVehicle 10
#define VClassSaloons 11
#define VClassSportCar 12
#define VClassStationCar 13
#define VClassTrailer 14
#define VClassUnique 15
// ******************************************************************************************************************************
// Enums and the array-setups that use them
// ******************************************************************************************************************************
// Setup a custom type that holds all data for houses
enum THouseData
{
PickupID, // Holds the pickup-id that is linked to this house
Text3D:DoorText, // Holds the reference to the 3DText above the house\'s pickup
MapIconID, // Holds the ID of the mapicon for the house
bool:Owned, // Holds true if the house is owned by somebody
Owner[24], // Holds the name of the owner of the house
HouseName[100], // Holds the name of the house (this will be displayed above the pickup near the house when it\'s owned)
Float:HouseX, // Holds the X-coordinate of the pickup for the house
Float:HouseY, // Holds the Y-coordinate of the pickup for the house
Float:HouseZ, // Holds the Z-coordinate of the pickup for the house
HouseLevel, // Holds the level of upgrades the house has, and defines which interior to use when you enter the house
HouseMaxLevel, // Holds the maximum level this house can be upgraded to
HousePrice, // Holds the price for buying the house, the same price applies when upgrading a house per level (multiplied by HouseUpgradePercent/100)
bool:HouseOpened, // Holds true if the house is open to the public (anyone can enter), false means: only the owner can enter it
bool:Insurance, // Holds \"true\" if the house has an insurance for the vehicles belonging to this house
VehicleIDs[10], // Holds the vehicle-id\'s of the vehicles linked to this house (max 10 vehicles per house)
bool:StaticHouse, // Holds \"true\" if the house is static (cannot be upgraded and has a fixed interior)
CarSlots // Holds the amount of carslots available
}
// Holds the data for all houses
new AHouseData[MAX_HOUSES][THouseData];
// Setup a custom type to hold all data about a vehicle
enum TVehicleData
{
BelongsToHouse, // Holds the HouseID to which this vehicle belongs
bool:Owned, // Holds true if the vehicle is owned by somebody
Owner[24], // Holds the name of the owner of the vehicle
Model, // Holds the vehicle-model of this vehicle
PaintJob, // Holds the ID of the paintjob applied to the vehicle
Components[14], // Holds all Component-ID\'s for all components on the vehicle
Color1, // Holds the primary color for this vehicle
Color2, // Holds the secundairy color for this vehicle
Float:SpawnX, // Holds the X-coordinate of the parking spot for this vehicle
Float:SpawnY, // Holds the Y-coordinate of the parking spot for this vehicle
Float:SpawnZ, // Holds the Z-coordinate of the parking spot for this vehicle
Float:SpawnRot // Holds the rotation of the parking spot for this vehicle
}
// Setup an array which holds all data for every vehicle, max 2000 vehicles (server limit)
new AVehicleData[2000][TVehicleData];
// Setup all the fields required for the player data (Speedometer TextDraw, current job, ...)
enum TPlayerData
{
Houses[20], // Holds the HouseID\'s of the houses that the player owns (index of the AHouseData array), maximum 20 houses per player
CurrentHouse, // Holds the HouseID to track in which house the player currently is (used when accessing the housemenu)
DialogBuyVClass,
DialogGetCarHouseID
}
// Create an array to hold the playerdata for every player
new APlayerData[MAX_PLAYERS][TPlayerData];
// Setup a custom type that holds all data about a house-interior (selected when entering a house, based on the house-level)
enum THouseInterior
{
InteriorName[50], // Holds the name of the interior
InteriorID, // Holds the interior-id
Float:IntX, // Holds the X-coordinate of the spawn-location where you enter the house
Float:IntY, // Holds the Y-coordinate of the spawn-location where you enter the house
Float:IntZ // Holds the Z-coordinate of the spawn-location where you enter the house
}
// Holds the data for all interiors for houses (each house-level has it\'s own interior)
new AHouseInteriors[][THouseInterior] =
{
{\"Dummy\", 0, 0.0, 0.0, 0.0}, // Dummy interior (Level 0), as the house-level starts at 1
{\"Small motel room\", 10, 2262.83, -1137.71, 1050.63}, // Level 1
{\"Small house\", 2, 2467.36, -1698.38, 1013.51}, // Level 2
{\"Small house 2\", 1, 223.00, 1289.26, 1082.20}, // Level 3
{\"Medium house\", 10, 2260.76, -1210.45, 1049.02}, // Level 4
{\"Medium house 2\", 8, 2365.42, -1131.85, 1050.88}, // Level 5
{\"Duplex house\", 12, 2324.33, -1144.79, 1050.71}, // Level 6
{\"Big house\", 15, 295.14, 1474.47, 1080.52}, // Level 7
{\"Big duplex house\", 3, 235.50, 1189.17, 1080.34}, // Level 8
{\"Huge house\", 7, 225.63, 1022.48, 1084.07}, // Level 9
{\"Mansion\", 5, 1299.14, -794.77, 1084.00} // Level 10
};
// Setup a custom type that holds all data about a buyable vehicle
enum TBuyableVehicle
{
CarName[50], // Holds the name of the vehicle
VehicleClass, // Holds the ID of the vehicleclass
CarModel, // Holds the model-ID of the vehicle
Price // Holds the price for the vehicle (renting it will be 10% of this price)
}
new ABuyableVehicles[][TBuyableVehicle] =
{
{\"Admiral\", VClassSaloons, 445, 50000},
{\"Alpha\", VClassSportCar, 602, 50000},
{\"Ambulance\", VClassPublic, 416, 50000},
{\"Andromada\", VClassPlane, 592, 50000},
{\"Article Trailer\", VClassTrailer, 591, 50000},
// {\"AT400\", VClassPlane, 577, 50000},
{\"Baggage\", VClassUnique, 485, 50000},
{\"Baggage Trailer A\", VClassTrailer, 606, 50000},
{\"Baggage Trailer B\", VClassTrailer, 607, 50000},
{\"Bandito\", VClassOffRoad, 568, 50000},
{\"Banshee\", VClassSportCar, 429, 50000},
{\"Barracks\", VClassPublic, 433, 50000},
{\"Beagle\", VClassPlane, 511, 50000},
{\"Benson\", VClassIndustrial, 499, 50000},
{\"Berkley\'s RC Van\", VClassIndustrial, 459, 50000},
{\"BF Injection\", VClassOffRoad, 424, 50000},
{\"BF-400\", VClassBike, 581, 50000},
{\"Bike\", VClassBike, 509, 50000},
{\"Blade\", VClassLowRider, 536, 50000},
{\"Blista Compact\", VClassSportCar, 496, 50000},
{\"Bloodring Banger\", VClassSaloons, 504, 50000},
{\"BMX\", VClassBike, 481, 50000},
{\"Bobcat\", VClassIndustrial, 422, 50000},
{\"Boxville 1\", VClassIndustrial, 498, 50000},
{\"Boxville 2\", VClassIndustrial, 609, 50000},
{\"Bravura\", VClassSaloons, 401, 50000},
{\"Broadway\", VClassLowRider, 575, 50000},
// {\"Brownstreak (train)\", VClassUnique, 538, 50000},
{\"Buccaneer\", VClassSaloons, 518, 50000},
{\"Buffalo\", VClassSportCar, 402, 50000},
{\"Bullet\", VClassSportCar, 541, 50000},
{\"Burrito\", VClassIndustrial, 482, 50000},
{\"Bus\", VClassPublic, 431, 50000},
{\"Cabbie\", VClassPublic, 438, 50000},
{\"Caddy\", VClassUnique, 457, 50000},
{\"Cadrona\", VClassSaloons, 527, 50000},
{\"Camper\", VClassUnique, 483, 50000},
{\"Cargo Trailer\", VClassTrailer, 435, 50000},
{\"Cargobob\", VClassHelicopter, 548, 50000},
{\"Cement Truck\", VClassIndustrial, 524, 50000},
{\"Cheetah\", VClassSportCar, 415, 50000},
{\"Clover\", VClassSaloons, 542, 50000},
{\"Club\", VClassSportCar, 589, 50000},
{\"Coach\", VClassPublic, 437, 50000},
{\"Coastguard\", VClassBoat, 472, 50000},
{\"Combine Harvester\", VClassUnique, 532, 50000},
{\"Comet\", VClassConvertible, 480, 50000},
{\"Cropduster\", VClassPlane, 512, 50000},
{\"DFT-30\", VClassIndustrial, 578, 50000},
{\"Dinghy\", VClassBoat, 473, 50000},
{\"Dodo\", VClassPlane, 593, 50000},
{\"Dozer\", VClassUnique, 486, 50000},
{\"Dumper\", VClassUnique, 406, 50000},
{\"Dune\", VClassOffRoad, 573, 50000},
{\"Elegant\", VClassSaloons, 507, 50000},
{\"Elegy\", VClassSaloons, 562, 50000},
{\"Emperor\", VClassSaloons, 585, 50000},
{\"Enforcer\", VClassPublic, 427, 50000},
{\"Esperanto\", VClassSaloons, 419, 50000},
{\"Euros\", VClassSportCar, 587, 50000},
{\"Faggio\", VClassBike, 462, 50000},
{\"Farm Trailer\", VClassTrailer, 610, 50000},
{\"FBI Rancher\", VClassPublic, 490, 50000},
{\"FBI Truck\", VClassPublic, 528, 50000},
{\"FCR-900\", VClassBike, 521, 50000},
{\"Feltzer\", VClassConvertible, 533, 50000},
{\"Firetruck\", VClassPublic, 407, 50000},
{\"Firetruck LA\", VClassPublic, 544, 50000},
{\"Flash\", VClassSportCar, 565, 50000},
{\"Flatbed\", VClassIndustrial, 455, 50000},
{\"Fluids Trailer\", VClassTrailer, 584, 50000},
{\"Forklift\", VClassUnique, 530, 50000},
{\"Fortune\", VClassSaloons, 526, 50000},
{\"Freeway\", VClassBike, 463, 50000},
// {\"Freight (train)\", VClassUnique, 537, 50000},
// {\"Freight Box Trailer (train)\", VClassTrailer, 590, 50000},
// {\"Freight Flat Trailer (train)\", VClassTrailer, 569, 50000},
{\"Glendale\", VClassSaloons, 466, 50000},
{\"Glendale Shit\", VClassSaloons, 604, 50000},
{\"Greenwood\", VClassSaloons, 492, 50000},
{\"Hermes\", VClassSaloons, 474, 50000},
{\"Hotdog\", VClassUnique, 588, 50000},
{\"Hotknife\", VClassUnique, 434, 50000},
{\"Hotring Racer 1\", VClassSportCar, 494, 50000},
{\"Hotring Racer 2\", VClassSportCar, 502, 50000},
{\"Hotring Racer 3\", VClassSportCar, 503, 50000},
{\"HPV1000\", VClassPublic, 523, 50000},
{\"Hunter\", VClassHelicopter, 425, 50000},
{\"Huntley\", VClassOffRoad, 579, 50000},
{\"Hustler\", VClassUnique, 545, 50000},
{\"Hydra\", VClassPlane, 520, 50000},
{\"Infernus\", VClassSportCar, 411, 50000},
{\"Intruder\", VClassSaloons, 546, 50000},
{\"Jester\", VClassSportCar, 559, 50000},
{\"Jetmax\", VClassBoat, 493, 50000},
{\"Journey\", VClassUnique, 508, 50000},
{\"Kart\", VClassUnique, 571, 50000},
{\"Landstalker\", VClassOffRoad, 400, 50000},
{\"Launch\", VClassBoat, 595, 50000},
{\"Leviathan\", VClassHelicopter, 417, 50000},
{\"Linerunner\", VClassIndustrial, 403, 50000},
{\"Majestic\", VClassSaloons, 517, 50000},
{\"Manana\", VClassSaloons, 410, 50000},
{\"Marquis\", VClassBoat, 484, 50000},
{\"Maverick\", VClassHelicopter, 487, 50000},
{\"Merit\", VClassSaloons, 551, 50000},
{\"Mesa\", VClassOffRoad, 500, 50000},
{\"Monster\", VClassOffRoad, 444, 50000},
{\"Monster A\", VClassOffRoad, 556, 50000},
{\"Monster B\", VClassOffRoad, 557, 50000},
{\"Moonbeam\", VClassStationCar, 418, 50000},
{\"Mountain Bike\", VClassBike, 510, 50000},
{\"Mower\", VClassUnique, 572, 50000},
{\"Mr Whoopee\", VClassUnique, 423, 50000},
{\"Mule\", VClassIndustrial, 414, 50000},
{\"Nebula\", VClassSaloons, 516, 50000},
{\"Nevada\", VClassPlane, 553, 50000},
{\"Newsvan\", VClassIndustrial, 582, 50000},
{\"NRG-500\", VClassBike, 522, 50000},
{\"Oceanic\", VClassSaloons, 467, 50000},
{\"Ore Trailer\", VClassTrailer, 450, 50000},
{\"Packer\", VClassIndustrial, 443, 50000},
{\"Patriot\", VClassOffRoad, 470, 50000},
{\"PCJ-600\", VClassBike, 461, 50000},
{\"Perenniel\", VClassStationCar, 404, 50000},
{\"Phoenix\", VClassSportCar, 603, 50000},
{\"Picador\", VClassIndustrial, 600, 50000},
{\"Pizzaboy\", VClassBike, 448, 50000},
{\"Police Car (LSPD)\", VClassPublic, 596, 50000},
{\"Police Car (LVPD)\", VClassPublic, 598, 50000},
{\"Police Car (SFPD)\", VClassPublic, 597, 50000},
{\"Police Maverick\", VClassHelicopter, 497, 50000},
{\"Police Ranger\", VClassPublic, 599, 50000},
{\"Pony\", VClassIndustrial, 413, 50000},
{\"Predator\", VClassBoat, 430, 50000},
{\"Premier\", VClassSaloons, 426, 50000},
{\"Previon\", VClassSaloons, 436, 50000},
{\"Primo\", VClassSaloons, 547, 50000},
{\"Quad\", VClassBike, 471, 50000},
{\"Raindance\", VClassHelicopter, 563, 50000},
{\"Rancher 1\", VClassOffRoad, 489, 50000},
{\"Rancher 2\", VClassOffRoad, 505, 50000},
// {\"RC Bandit\", VClassRCVehicle, 441, 50000},
// {\"RC Baron\", VClassRCVehicle, 464, 50000},
// {\"RC Cam\", VClassRCVehicle, 594, 50000},
// {\"RC Goblin\", VClassRCVehicle, 501, 50000},
// {\"RC Raider\", VClassRCVehicle, 465, 50000},
// {\"RC Tiger\", VClassRCVehicle, 564, 50000},
{\"Reefer\", VClassBoat, 453, 50000},
{\"Regina\", VClassStationCar, 479, 50000},
{\"Remington\", VClassLowRider, 534, 50000},
{\"Rhino\", VClassPublic, 432, 50000},
{\"Roadtrain\", VClassIndustrial, 515, 50000},
{\"Romero\", VClassUnique, 442, 50000},
{\"Rumpo\", VClassIndustrial, 440, 50000},
{\"Rustler\", VClassPlane, 476, 50000},
{\"Sabre\", VClassSportCar, 475, 50000},
{\"Sadler\", VClassIndustrial, 543, 50000},
{\"Sadler Shit\", VClassIndustrial, 605, 50000},
{\"SAN News Maverick\", VClassHelicopter, 488, 50000},
{\"Sanchez\", VClassBike, 468, 50000},
{\"Sandking\", VClassOffRoad, 495, 50000},
{\"Savanna\", VClassLowRider, 567, 50000},
{\"Seasparrow\", VClassHelicopter, 447, 50000},
{\"Securicar\", VClassUnique, 428, 50000},
{\"Sentinel\", VClassSaloons, 405, 50000},
{\"Shamal\", VClassPlane, 519, 50000},
{\"Skimmer\", VClassPlane, 460, 50000},
{\"Slamvan\", VClassLowRider, 535, 50000},
{\"Solair\", VClassStationCar, 458, 50000},
{\"Sparrow\", VClassHelicopter, 469, 50000},
{\"Speeder\", VClassBoat, 452, 50000},
{\"Squallo\", VClassBoat, 446, 50000},
{\"Stafford\", VClassSaloons, 580, 50000},
{\"Stallion\", VClassConvertible, 439, 50000},
{\"Stratum\", VClassStationCar, 561, 50000},
// {\"Streak Trailer (train)\", VClassTrailer, 570, 50000},
{\"Stretch\", VClassUnique, 409, 50000},
{\"Stuntplane\", VClassPlane, 513, 50000},
{\"Sultan\", VClassSaloons, 560, 50000},
{\"Sunrise\", VClassSaloons, 550, 50000},
{\"Super GT\", VClassSportCar, 506, 50000},
{\"S.W.A.T.\", VClassPublic, 601, 50000},
{\"Sweeper\", VClassUnique, 574, 50000},
{\"Tahoma\", VClassLowRider, 566, 50000},
{\"Tampa\", VClassSaloons, 549, 50000},
{\"Tanker\", VClassIndustrial, 514, 50000},
{\"Taxi\", VClassPublic, 420, 50000},
{\"Tornado\", VClassLowRider, 576, 50000},
{\"Towtruck\", VClassUnique, 525, 50000},
{\"Tractor\", VClassIndustrial, 531, 50000},
// {\"Tram\", VClassUnique, 449, 50000},
{\"Trashmaster\", VClassIndustrial, 408, 50000},
{\"Tropic\", VClassBoat, 454, 50000},
{\"Tug\", VClassUnique, 583, 50000},
{\"Tug Stairs Trailer\", VClassTrailer, 608, 50000},
{\"Turismo\", VClassSportCar, 451, 50000},
{\"Uranus\", VClassSportCar, 558, 50000},
{\"Utility Trailer\", VClassTrailer, 611, 50000},
{\"Utility Van\", VClassIndustrial, 552, 50000},
{\"Vincent\", VClassSaloons, 540, 50000},
{\"Virgo\", VClassSaloons, 491, 50000},
{\"Voodoo\", VClassLowRider, 412, 50000},
{\"Vortex\", VClassUnique, 539, 50000},
{\"Walton\", VClassIndustrial, 478, 50000},
{\"Washington\", VClassSaloons, 421, 50000},
{\"Wayfarer\", VClassBike, 586, 50000},
{\"Willard\", VClassSaloons, 529, 50000},
{\"Windsor\", VClassConvertible, 555, 50000},
{\"Yankee\", VClassIndustrial, 456, 50000},
{\"Yosemite\", VClassIndustrial, 554, 50000},
{\"ZR-350\", VClassSportCar, 477, 50000}
};
// Setup an array that holds all prices for vehicle-components
new AVehicleModPrices[] =
{
400, // ID 1000, Spoiler Pro Certain Transfender cars
550, // ID 1001, Spoiler Win Certain Transfender cars
200, // ID 1002, Spoiler Drag Certain Transfender cars
250, // ID 1003, Spoiler Alpha Certain Transfender cars
100, // ID 1004, Hood Champ Scoop Certain Transfender cars
150, // ID 1005, Hood Fury Scoop Certain Transfender cars
80, // ID 1006, Roof Roof Scoop Certain Transfender cars
500, // ID 1007, Sideskirt Right Sideskirt Certain Transfender cars
500, // ID 1008, Nitro 5 times Most cars, Most planes and Most Helicopters
200, // ID 1009, Nitro 2 times Most cars, Most planes and Most Helicopters
1000, // ID 1010, Nitro 10 times Most cars, Most planes and Most Helicopters
220, // ID 1011, Hood Race Scoop Certain Transfender cars
250, // ID 1012, Hood Worx Scoop Certain Transfender cars
100, // ID 1013, Lamps Round Fog Certain Transfender cars
400, // ID 1014, Spoiler Champ Certain Transfender cars
500, // ID 1015, Spoiler Race Certain Transfender cars
200, // ID 1016, Spoiler Worx Certain Transfender cars
500, // ID 1017, Sideskirt Left Sideskirt Certain Transfender cars
350, // ID 1018, Exhaust Upswept Most cars
300, // ID 1019, Exhaust Twin Most cars
250, // ID 1020, Exhaust Large Most cars
200, // ID 1021, Exhaust Medium Most cars
150, // ID 1022, Exhaust Small Most cars
350, // ID 1023, Spoiler Fury Certain Transfender cars
50, // ID 1024, Lamps Square Fog Certain Transfender cars
1000, // ID 1025, Wheels Offroad Certain Transfender cars
480, // ID 1026, Sideskirt Right Alien Sideskirt Sultan
480, // ID 1027, Sideskirt Left Alien Sideskirt Sultan
770, // ID 1028, Exhaust Alien Sultan
680, // ID 1029, Exhaust X-Flow Sultan
370, // ID 1030, Sideskirt Left X-Flow Sideskirt Sultan
370, // ID 1031, Sideskirt Right X-Flow Sideskirt Sultan
170, // ID 1032, Roof Alien Roof Vent Sultan
120, // ID 1033, Roof X-Flow Roof Vent Sultan
790, // ID 1034, Exhaust Alien Elegy
150, // ID 1035, Roof X-Flow Roof Vent Elegy
500, // ID 1036, SideSkirt Right Alien Sideskirt Elegy
690, // ID 1037, Exhaust X-Flow Elegy
190, // ID 1038, Roof Alien Roof Vent Elegy
390, // ID 1039, SideSkirt Right X-Flow Sideskirt Elegy
500, // ID 1040, SideSkirt Left Alien Sideskirt Elegy
390, // ID 1041, SideSkirt Right X-Flow Sideskirt Elegy
1000, // ID 1042, SideSkirt Right Chrome Sideskirt Broadway
500, // ID 1043, Exhaust Slamin Broadway
500, // ID 1044, Exhaust Chrome Broadway
510, // ID 1045, Exhaust X-Flow Flash
710, // ID 1046, Exhaust Alien Flash
670, // ID 1047, SideSkirt Right Alien Sideskirt Flash
530, // ID 1048, SideSkirt Right X-Flow Sideskirt Flash
810, // ID 1049, Spoiler Alien Flash
620, // ID 1050, Spoiler X-Flow Flash
670, // ID 1051, SideSkirt Left Alien Sideskirt Flash
530, // ID 1052, SideSkirt Left X-Flow Sideskirt Flash
130, // ID 1053, Roof X-Flow Flash
210, // ID 1054, Roof Alien Flash
230, // ID 1055, Roof Alien Stratum
520, // ID 1056, Sideskirt Right Alien Sideskirt Stratum
430, // ID 1057, Sideskirt Right X-Flow Sideskirt Stratum
620, // ID 1058, Spoiler Alien Stratum
720, // ID 1059, Exhaust X-Flow Stratum
530, // ID 1060, Spoiler X-Flow Stratum
180, // ID 1061, Roof X-Flow Stratum
520, // ID 1062, Sideskirt Left Alien Sideskirt Stratum
430, // ID 1063, Sideskirt Left X-Flow Sideskirt Stratum
830, // ID 1064, Exhaust Alien Stratum
850, // ID 1065, Exhaust Alien Jester
750, // ID 1066, Exhaust X-Flow Jester
250, // ID 1067, Roof Alien Jester
200, // ID 1068, Roof X-Flow Jester
550, // ID 1069, Sideskirt Right Alien Sideskirt Jester
450, // ID 1070, Sideskirt Right X-Flow Sideskirt Jester
550, // ID 1071, Sideskirt Left Alien Sideskirt Jester
450, // ID 1072, Sideskirt Left X-Flow Sideskirt Jester
1100, // ID 1073, Wheels Shadow Most cars
1030, // ID 1074, Wheels Mega Most cars
980, // ID 1075, Wheels Rimshine Most cars
1560, // ID 1076, Wheels Wires Most cars
1620, // ID 1077, Wheels Classic Most cars
1200, // ID 1078, Wheels Twist Most cars
1030, // ID 1079, Wheels Cutter Most cars
900, // ID 1080, Wheels Switch Most cars
1230, // ID 1081, Wheels Grove Most cars
820, // ID 1082, Wheels Import Most cars
1560, // ID 1083, Wheels Dollar Most cars
1350, // ID 1084, Wheels Trance Most cars
770, // ID 1085, Wheels Atomic Most cars
100, // ID 1086, Stereo Stereo Most cars
1500, // ID 1087, Hydraulics Hydraulics Most cars
150, // ID 1088, Roof Alien Uranus
650, // ID 1089, Exhaust X-Flow Uranus
450, // ID 1090, Sideskirt Right Alien Sideskirt Uranus
100, // ID 1091, Roof X-Flow Uranus
750, // ID 1092, Exhaust Alien Uranus
350, // ID 1093, Sideskirt Right X-Flow Sideskirt Uranus
450, // ID 1094, Sideskirt Left Alien Sideskirt Uranus
350, // ID 1095, Sideskirt Right X-Flow Sideskirt Uranus
1000, // ID 1096, Wheels Ahab Most cars
620, // ID 1097, Wheels Virtual Most cars
1140, // ID 1098, Wheels Access Most cars
1000, // ID 1099, Sideskirt Left Chrome Sideskirt Broadway
940, // ID 1100, Bullbar Chrome Grill Remington
780, // ID 1101, Sideskirt Left `Chrome Flames` Sideskirt Remington
830, // ID 1102, Sideskirt Left `Chrome Strip` Sideskirt Savanna
3250, // ID 1103, Roof Convertible Blade
1610, // ID 1104, Exhaust Chrome Blade
1540, // ID 1105, Exhaust Slamin Blade
780, // ID 1106, Sideskirt Right `Chrome Arches` Remington
780, // ID 1107, Sideskirt Left `Chrome Strip` Sideskirt Blade
780, // ID 1108, Sideskirt Right `Chrome Strip` Sideskirt Blade
1610, // ID 1109, Rear Bullbars Chrome Slamvan
1540, // ID 1110, Rear Bullbars Slamin Slamvan
55, // ID 1111, Front Sign? Little Sign? Slamvan
55, // ID 1112, Front Sign? Little Sign? Slamvan
3340, // ID 1113, Exhaust Chrome Slamvan
3250, // ID 1114, Exhaust Slamin Slamvan
2130, // ID 1115, Front Bullbars Chrome Slamvan
2050, // ID 1116, Front Bullbars Slamin Slamvan
2040, // ID 1117, Front Bumper Chrome Slamvan
780, // ID 1118, Sideskirt Right `Chrome Trim` Sideskirt Slamvan
940, // ID 1119, Sideskirt Right `Wheelcovers` Sideskirt Slamvan
780, // ID 1120, Sideskirt Left `Chrome Trim` Sideskirt Slamvan
940, // ID 1121, Sideskirt Left `Wheelcovers` Sideskirt Slamvan
780, // ID 1122, Sideskirt Right `Chrome Flames` Sideskirt Remington
860, // ID 1123, Bullbars Bullbar Chrome Bars Remington
780, // ID 1124, Sideskirt Left `Chrome Arches` Sideskirt Remington
1120, // ID 1125, Bullbars Bullbar Chrome Lights Remington
3340, // ID 1126, Exhaust Chrome Exhaust Remington
3250, // ID 1127, Exhaust Slamin Exhaust Remington
3340, // ID 1128, Roof Vinyl Hardtop Blade
1650, // ID 1129, Exhaust Chrome Savanna
3380, // ID 1130, Roof Hardtop Savanna
3290, // ID 1131, Roof Softtop Savanna
1590, // ID 1132, Exhaust Slamin Savanna
830, // ID 1133, Sideskirt Right `Chrome Strip` Sideskirt Savanna
800, // ID 1134, SideSkirt Right `Chrome Strip` Sideskirt Tornado
1500, // ID 1135, Exhaust Slamin Tornado
1000, // ID 1136, Exhaust Chrome Tornado
800, // ID 1137, Sideskirt Left `Chrome Strip` Sideskirt Tornado
580, // ID 1138, Spoiler Alien Sultan
470, // ID 1139, Spoiler X-Flow Sultan
870, // ID 1140, Rear Bumper X-Flow Sultan
980, // ID 1141, Rear Bum