16.12.2015, 15:51
PHP код:
CMD:hood(playerid, params[])
{
for (new i = 1; i != MAX_VEHICLES; i ++) if (IsValidVehicle(i) && IsPlayerNearHood(playerid, i))
{
if (!IsDoorVehicle(i))
return SendClientMessage(playerid, -1, "{FF0000}Error:{FFFFFF}This Vehicle Doesn't Have Hood.");
if (!GetHoodStatus(i))
{
SetHoodStatus(i, true);
SendClientMessage(playerid, -1, "You Have {00FF40}Opened{FFFFFF} The Hood");
}
else
{
SetHoodStatus(i, false);
SendClientMessage(playerid, -1, "You Have {FF0000}Closed {FFFFFF}The Hood");
}
}
else SendClientMessage(playerid, -1, "{FF0000}Error:{FFFFFF}You Are Not In Range Of Any Vehicle");
return 1;
}