06.07.2011, 22:10
PHP код:
public OnVehicleDeath(vehicleid, killerid) {
foreach(Player, v) {
if(playerVariables[v][pCarID] == vehicleid) {
DestroyVehicle(vehicleid); // If an owned car is destroyed... it'll be manually despawned...
systemVariables[vehicleCounts][1]--;
playerVariables[v][pCarPos][0] = [pCarSavePos]; // Respawned where it's saved
playerVariables[v][pCarPos][1] = [pCarSavePos];
playerVariables[v][pCarPos][2] = [pCarSavePos];
playerVariables[v][pCarPos][3] = [pCarSavePos]; // have its Z angle set
SpawnPlayerVehicle(v); // And spawned.
SetVehicleHealth(playerVariables[v][pCarID], 400.0); // A wrecked car is a wrecked car.
new
Damage[4]; // Complete the job!
GetVehicleDamageStatus(playerVariables[v][pCarID], Damage[0], Damage[1], Damage[2], Damage[3]);
Damage[0] = encode_panels(1, 1, 1, 1, 3, 3, 3);
Damage[1] = encode_doors(4, 4, 4, 4);
Damage[2] = encode_lights(1, 1, 1, 1);
UpdateVehicleDamageStatus(playerVariables[v][pCarID], Damage[0], Damage[1], Damage[2], Damage[3]);
}
}
return 1;
d:\Fontos\Version 0.0.1alpha\gamemodes\rp.pwn(987) : error 029: invalid expression, assumed zero
d:\Fontos\Version 0.0.1alpha\gamemodes\rp.pwn(987) : warning 215: expression has no effect
d:\Fontos\Version 0.0.1alpha\gamemodes\rp.pwn(987) : error 001: expected token: ";", but found "]"
d:\Fontos\Version 0.0.1alpha\gamemodes\rp.pwn(987) : error 029: invalid expression, assumed zero
d:\Fontos\Version 0.0.1alpha\gamemodes\rp.pwn(987) : fatal error 107: too many error messages on one
with coordinates
playerVariables[v][pCarPos][0] = 508.5559; like this it works!
Thank you for helping!
Regards