The vehicle can be repaired every 60 seconds. Help!
#5

The callback you made has to have the same name as the forward
pawn Код:
#include <a_samp>

#define CZERWONY 0xFF0000FF
#define ZIELONY 0x00FF00FF

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SUBMISSION && IsPlayerInAnyVehicle(playerid))
    {
        SetTimerEx("RVehicle", 1000, 60000, "i", playerid);
        return 1;
    }

    return 1;
}
forward RVehicle(playerid);
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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)