if (IsALaw(playerid) orgvid[orgid-1][giveplayerid-1] = CreateVehicle2(model, x, y, z, a, 900, addsiren=1);
CMD:addorgv(playerid, params[]) { new orgid, col1, col2, moneys1, tmp[256], tmp2[256], string[256], giveplayer[25], giveplayerid; if (adlvl[playerid] < 6) return 0; if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage2(playerid, COLOR_RED, "Error: You must be in a vehicle."); if (sscanf(params, "ddd", orgid, col1, col2)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /addorgv [orgid] [color1] [color2]"); format(string, 10, "org%d", orgid); if (!dini_Exists(AddDirFile(dir_orgfiles, string))) return SendClientMessage2(playerid, COLOR_RED, "Error: Invalid organization id."); if (col1 < -1 || col1 > 255 || col2 < -1 || col2 > 255) return SendClientMessage2(playerid, COLOR_RED, "Error: Invalid color id! (-1 - 255)"); for (new ovs = MAX_ORG_VEHICLES; ovs > 0; ovs--) { format(giveplayer, 12, "ocmodel_%d", ovs); if (dini_Int(AddDirFile(dir_orgfiles, string), giveplayer) == 0) giveplayerid = ovs; else moneys1 ++; } if (moneys1 == MAX_ORG_VEHICLES) { format(tmp2, sizeof(tmp2), "This organization has reached the max of %d vehicles.", MAX_ORG_VEHICLES); SendClientMessage2(playerid, COLOR_RED, tmp2); return 1; } new pvid = GetPlayerVehicleID(playerid); if (vorgo[pvid] != 0) return SendClientMessage2(playerid, COLOR_RED, "This vehicle already belongs to an organization."); new Float:x, Float:y, Float:z, Float:a; GetVehiclePos(pvid, x, y, z); GetVehicleZAngle(pvid, a); new model = GetVehicleModel(pvid); format(giveplayer, 12, "ocmodel_%d", giveplayerid); dini_IntSet(AddDirFile(dir_orgfiles, string), giveplayer, model); format(giveplayer, 12, "ocx_%d", giveplayerid); dini_FloatSet(AddDirFile(dir_orgfiles, string), giveplayer, x); format(giveplayer, 12, "ocy_%d", giveplayerid); dini_FloatSet(AddDirFile(dir_orgfiles, string), giveplayer, y); format(giveplayer, 12, "ocz_%d", giveplayerid); dini_FloatSet(AddDirFile(dir_orgfiles, string), giveplayer, z); format(giveplayer, 12, "oca_%d", giveplayerid); dini_FloatSet(AddDirFile(dir_orgfiles, string), giveplayer, a); format(giveplayer, 12, "occ1_%d", giveplayerid); dini_IntSet(AddDirFile(dir_orgfiles, string), giveplayer, col1); format(giveplayer, 12, "occ2_%d", giveplayerid); dini_IntSet(AddDirFile(dir_orgfiles, string), giveplayer, col2); SetVehicleToRespawn(pvid); if (col1 == -1 || col2 == -1) orgvid[orgid-1][giveplayerid-1] = CreateVehicle2(model, x, y, z, a, 900); else { orgvid[orgid-1][giveplayerid-1] = CreateVehicle(model, x, y, z, a, col1, col2, 900); vmodelused[model-400] ++; if (vmodelused[model-400] == 1) vehiclemodels ++; } if (dini_Isset(AddDirFile(dir_orgfiles, string), "lplate")) { format(tmp, 24, "%s %d", dini_Get(AddDirFile(dir_orgfiles, string), "lplate"), giveplayerid); SetVehicleNumberPlate2(orgvid[orgid-1][giveplayerid-1], tmp); SetVehicleToRespawn(orgvid[orgid-1][giveplayerid-1]); } vorgo[orgvid[orgid-1][giveplayerid-1]] = orgid; vorgid[orgvid[orgid-1][giveplayerid-1]] = giveplayerid; SendPlayerFormattedText(playerid, COLOR_SILVER, "Vehicle '%s' has been added to '%s'.", vehName[model-400], dini_Get(AddDirFile(dir_orgfiles, string), "name")); return 1; }
there's no such a function for add a siren, u can only create a vehicle with siren imported.
|
There's a function to add sirens into a vehicle, stop fucking talking when you don't know shit. I have a command on my gamemode will check it later and paste it here.
|
yeah again trashtalk, U CANNT F&&CKING ATTACH A SOUND SIREN TO A VEHICLE.
P.S. waiting for you to give us this knowledge. |
Mugalito, what is this? : https://www.youtube.com/watch?v=AFQUTIMDM9s
|
there's no such a function for add a siren, u can only create a vehicle with siren imported.
|
I already said that u can ONLY IMPORT and cannot ATTACH a sound siren into a created vehicle.
if u know a function to add a siren into a created vehicle, than tell me. |
PlayerPlaySound
http://wiki.sa-mp.com/wiki/SoundID
http://wiki.sa-mp.com/wiki/PlayerPlaySound
There's a function, if you're not sure about something then don't say it. Wait until i post the code here as i'm not home right now
|