SA-MP Forums Archive
AddSiren 0.3.7 - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AddSiren 0.3.7 (/showthread.php?tid=640965)



AddSiren 0.3.7 - Puff - 09.09.2017

Код:
YCMD:createfactioncar(playerid, params[], help) {
	if(help) {
		SendClientMessage(playerid, X11_WHITE, "Creates a faction vehicle");
		return 1;
	}
	new model, faction, c1, c2;
	if(!sscanf(params, "dddd", faction, model, c1, c2)) {
		if(!IsValidFaction(faction)) {
			SendClientMessage(playerid, X11_TOMATO_2, "Invalid Faction!");
			return 1;
		}
		if(model < 400 || model > 611) {
			SendClientMessage(playerid, X11_TOMATO_2, "Invalid Model!");
			return 1;
		}
		new Float:X, Float:Y, Float:Z, Float:A;
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, A);
		createFactionVehicle(faction, model, X, Y, Z, A, c1, c2);
	} else {
		SendClientMessage(playerid, X11_WHITE, "USAGE: /createfactioncar [factionid] [model] [c1] [c2]");
	}
	return 1;
}
How can I add the new addsiren for 0.3.7 under this cmd?


Re: AddSiren 0.3.7 - Dusan01 - 09.09.2017

createvehicle has another parameter at end
Код:
CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, addsiren=0)
https://sampwiki.blast.hk/wiki/CreateVehicle


Re: AddSiren 0.3.7 - Puff - 09.09.2017

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
createvehicle has another parameter at end
Код:
CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay, addsiren=0)
https://sampwiki.blast.hk/wiki/CreateVehicle
Undefined symbol addsiren


Re: AddSiren 0.3.7 - Abagail - 09.09.2017

You don't ACTUALLY put addsiren=0, that's just the format of the function. You either put 0 or 1 (no siren, has siren).


Re: AddSiren 0.3.7 - aoky - 09.09.2017

1 at the end = SIREN ON
PHP код:
CreateVehicle(modelidFloat:xFloat:yFloat:zFloat:anglecolor1color2respawn_delay1
0 at the end = SIREN OFF
PHP код:
CreateVehicle(modelidFloat:xFloat:yFloat:zFloat:anglecolor1color2respawn_delay0