05.06.2015, 17:20
vehicle is going to be repaired/fixed in a zone (defined x-y-z and range) for example in Pay'n Spray , if veh=fixed return me a text message
How this can be done ?
How this can be done ?
new gPayNSpray;
public OnGameModeInit()
{
// This will create a cube. The length of each side is 4.0
// The first 6 parameters are: minx, miny, minz, maxx, maxy, maxz
gPayNSpray = CreateDynamicCuboid(-2.0, -2.0, -2.0, 2.0, 2.0, 2.0);
}
Functie IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (x > minx && x < maxx && y > miny && y < maxy) return 1; return 0; }
public IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if (x > minx && x < maxx && y > miny && y < maxy) return 1; return 0; }
if(IsPlayerInArea(id, 1, 2, 3, 4)) { new Float:health; new veh = GetPlayerVehicleID(playerid); GetVehicleHealth(veh, health); if(health == 1000) return SendClientMessage(playerid, COLOR_RED, "FULL VEH HEALTH."); SetVehicleHealth(veh, 999.99); }