17.11.2013, 12:27
Hello guy, I'm Ron.
Look I'm a junior scripter I create a new commands about police traffic,
like /deploycone , /deployflare ...
I've a problem with /deploycone and /deployflare
The problem is not a error bug, it's when I'm creating the cone by /deploycone or I'm creating the flare by /deployflare
That's what the problem [X,Y,Z. the Z is higher but I don't know how to low it]
A Picture:
The Code:
{
CMD:deployflare(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 ||
PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
return 1;
}
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank 3 to use this command.");
return 1;
}
new string[128], Float:Position[4];
for(new i; i<MAX_FLARES; i++)
{
if(Flare[i] == 0)
{
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
GetPlayerFacingAngle(playerid, Position[3]);
Flare[i] = CreateDynamicObject(18728, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+180.0, -0, -1, -1, 200.0);
SetPlayerPos(playerid, Position[0], Position[1], Position[2]+5);
new zone[MAX_ZONE_NAME];
GetPlayer3DZone(playerid, zone, sizeof(zone));
format(string, sizeof(string), "HQ: A flare has been deployed by %s at %s.", GetPlayerNameEx(playerid), zone);
foreach(Player, x)
{
if(IsACop(x))
{
SendClientMessageEx(x, TEAM_BLUE_COLOR, string);
if (PlayerInfo[x][pRank] >= 3)
{
SendClientMessageEx(x, COLOR_YELLOW, "You can remove a flare by typing /destroyflare.");
}
}
}
return 1;
}
}
SendClientMessageEx(playerid, COLOR_GREY, "All available flares have been deployed.");
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "You are not an LEO.");
}
return 1;
}
(Thank you for helping )
Look I'm a junior scripter I create a new commands about police traffic,
like /deploycone , /deployflare ...
I've a problem with /deploycone and /deployflare
The problem is not a error bug, it's when I'm creating the cone by /deploycone or I'm creating the flare by /deployflare
That's what the problem [X,Y,Z. the Z is higher but I don't know how to low it]
A Picture:
The Code:
{
CMD:deployflare(playerid, params[])
{
if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 ||
PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
return 1;
}
if(PlayerInfo[playerid][pRank] < 3 && PlayerInfo[playerid][pMember] != 2)
{
SendClientMessageEx(playerid, COLOR_GREY, "You need to be at least rank 3 to use this command.");
return 1;
}
new string[128], Float:Position[4];
for(new i; i<MAX_FLARES; i++)
{
if(Flare[i] == 0)
{
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
GetPlayerFacingAngle(playerid, Position[3]);
Flare[i] = CreateDynamicObject(18728, Position[0], Position[1], Position[2], 0.0, 0.0, Position[3]+180.0, -0, -1, -1, 200.0);
SetPlayerPos(playerid, Position[0], Position[1], Position[2]+5);
new zone[MAX_ZONE_NAME];
GetPlayer3DZone(playerid, zone, sizeof(zone));
format(string, sizeof(string), "HQ: A flare has been deployed by %s at %s.", GetPlayerNameEx(playerid), zone);
foreach(Player, x)
{
if(IsACop(x))
{
SendClientMessageEx(x, TEAM_BLUE_COLOR, string);
if (PlayerInfo[x][pRank] >= 3)
{
SendClientMessageEx(x, COLOR_YELLOW, "You can remove a flare by typing /destroyflare.");
}
}
}
return 1;
}
}
SendClientMessageEx(playerid, COLOR_GREY, "All available flares have been deployed.");
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "You are not an LEO.");
}
return 1;
}
(Thank you for helping )