19.01.2012, 13:58
The car should be fixed for all players yea?
to
pawn Код:
#include <a_samp>
#define CZERWONY 0xFF0000FF
#define ZIELONY 0x00FF00FF
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
{
new currentveh; // flip
new Float:angle; // flip
currentveh = GetPlayerVehicleID(playerid); // flip
GetVehicleZAngle(currentveh, angle); // flip
SetVehicleZAngle(currentveh, angle); // flip
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
return 1;
}
return 1;
}
pawn Код:
#include <a_samp>
#define CZERWONY 0xFF0000FF
#define ZIELONY 0x00FF00FF
forward RepairVehicle(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
{
SetTimerEx("RVehicle", 1000, 60000, "i", playerid);
return 1;
}
return 1;
}
public RVehicle(playerid)
{
new currentveh; // flip
new Float:angle; // flip
currentveh = GetPlayerVehicleID(playerid); // flip
GetVehicleZAngle(currentveh, angle); // flip
SetVehicleZAngle(currentveh, angle); // flip
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
return 1;
}