/deploycade How to add more ads!
#1

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
Reply
#2

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;
}

Reply
#3

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
Reply
#4

bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)