05.07.2015, 13:23
He's not kidding.
Although, if you use this, you'll need to alter any commands related to roadblocks. Especially your roadblock removal command.
pawn Код:
// At the top of your script:
#define MAX_ROADBLOCKS 20
new RoadBlock[MAX_PLAYERS][MAX_ROADBLOCKS];
// Command
CMD:roadblock(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a cop!");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can`t place a Roadblock when you are in a vehicle!");
for(new i = 0; i < MAX_ROADBLOCKS; i++)
{
if(IsValidObject(RoadBlock[playerid][i])) continue;
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
RoadBlock[playerid][i] = CreateObject(979, X + (2.0 * floatsin(-A, degrees)), Y + (2.0 * floatcos(-A, degrees)), Z, 0.0, 0.0, A);
GameTextForPlayer(playerid, "~w~Roadblock ~r~Placed", 5000, 5);
return 1;
}
SendClientMessage(playerid, COLOR_GREY, "Roadblock limit reached. Please remove some Roadblocks first!");
}
return 1;
}