/deploycade How to add more ads! - 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: /deploycade How to add more ads! (
/showthread.php?tid=575151)
/deploycade How to add more ads! -
Lukex - 24.05.2015
Hi So i have a deploy cade code
http://pastebin.com/KDzRinv8
But if i do /deploycade 2, /deploycade 3 ect ect I want a differnt cade to deploy not just the same 5 block roadblock one. Also any know where I can get the cade ids
Re: /deploycade How to add more ads! -
SoFahim - 24.05.2015
It can help you
Quote:
CMD:deploycade(playerid, params[])
{
if(IsACop(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
return 1;
}
new string[128], Float:Position[4];
for(new i; i<MAX_BARRICADES; i++)
{
if(Barricade[i] == 0)
{
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
GetPlayerFacingAngle(playerid, Position[3]);
Barricade[i] = CreateDynamicObject(981, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+180.0, -1, -1, -1, 200.0);
SetPlayerPos(playerid, Position[0] - 2, Position[1] - 2, Position[2]);
new zone[MAX_ZONE_NAME];
GetPlayer3DZone(playerid, zone, sizeof(zone));
format(string, sizeof(string), "HQ: A barricade has been deployed by %s at %s.", GetPlayerNameEx(playerid), zone);
foreach (new p : Player)
{
if(IsACop(p) || IsALVMPDCop(p))
{
SendClientMessageEx(p, TEAM_BLUE_COLOR, string);
}
}
return 1;
}
}
SendClientMessageEx(playerid, COLOR_GREY, "All available barriers have been deployed.");
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not a law enforcement officer.");
}
return 1;
}
|
Re: /deploycade How to add more ads! -
Lukex - 24.05.2015
Is it this part?
if(Barricade[i] == 0)
{
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
GetPlayerFacingAngle(playerid, Position[3]);
Barricade[i] = CreateDynamicObject(981, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+180.0, -1, -1, -1, 200.0);
SetPlayerPos(playerid, Position[0] - 2, Position[1] - 2, Position[2]);
new zone[MAX_ZONE_NAME];
GetPlayer3DZone(playerid, zone, sizeof(zone));
format(string, sizeof(string), "HQ: A barricade has been deployed by %s at %s.", GetPlayerNameEx(playerid), zone);
foreach (new p : Player)
{
Do i change if(Barricade[i] == 0) to if(Barricade[i] == 1) ect
Re: /deploycade How to add more ads! -
Lukex - 24.05.2015
bump!