23.02.2013, 20:25
PHP код:
IsAC4Boat(carid)
{
for(new v = 0; v < sizeof(C4Vehicles); v++)
{
if(carid == C4Vehicles[v]) return 1;
}
return 0;
}
else if(IsAC4Boat(vehicleid))
{
if(StealingC4[playerid] == playerid)
{
if(BoatHaveC4[GetPlayerVehicleID(playerid)] == 1)
{
C4B[playerid] = 1;
TogglePlayerControllable(playerid, 1);
SetPlayerCheckpoint(playerid, -426.44,1163.00,0.70, 5.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Drive to the checkpoint to receive C4");
}
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
NOPCheck(playerid);
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not stealing c4");
}
}
C4Vehicles[0] = AddStaticVehicleEx(472,-1449.8000488,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[1] = AddStaticVehicleEx(472,-1438.0000000,425.3999939,0.0000000,270.0000000,31,31,15); //Coastguard
C4Vehicles[2] = AddStaticVehicleEx(472,-1425.9000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[3] = AddStaticVehicleEx(472,-1413.4000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[4] = AddStaticVehicleEx(472,-1401.6999512,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[5] = AddStaticVehicleEx(472,-1389.9000244,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[6] = AddStaticVehicleEx(472,-1377.5999756,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[7] = AddStaticVehicleEx(472,-1365.5000000,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard
C4Vehicles[8] = AddStaticVehicleEx(472,-1353.5000000,425.3999939,0.0000000,270.0000000,30,30,15); //Coastguard