Fix Command
#1

Hello,
I have in my server this Script for Fix:

Код:
// ------ fix -----------------------------------------------------------------
dcmd_fix(playerid, params[]) {
	#pragma unused params
	if(IsPlayerInAnyVehicle(playerid)) {
		SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
		SendClientMessageLang(playerid, COLOR_ORANGE,"Vehicle fixed.","Voertuig Gerepareerd.");
	}
	else
	{
		SendClientMessageLang(playerid, COLOR_WARN,"You must be in vehicle!","Je moet in een voertuig zitten!");
	}
	return 1;
}
dcmd_repair(playerid, params[]) { dcmd_fix(playerid, params); return 1; }
But when i repair The health goes to 1000.
But the car will not repair
Screenshot:


Check that thing right on the bottom
and check the car...
i Dont know whats wrong..

Help Please?
Reply
#2

RepairVehicle(GetPlayerVehicleID(playerid));
Reply
#3

Where Must i plant it in?
Reply
#4

pawn Код:
dcmd_fix(playerid, params[]) {
    #pragma unused params
    if(IsPlayerInAnyVehicle(playerid)) {
        SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
        SendClientMessageLang(playerid, COLOR_ORANGE,"Vehicle fixed.","Voertuig Gerepareerd.");
    }
    else
    {
        SendClientMessageLang(playerid, COLOR_WARN,"You must be in vehicle!","Je moet in een voertuig zitten!");
    }
    return 1;
}
Reply
#5

Thank you so much Thanks thanks thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)