12.01.2011, 15:01
Hi all, sorry if the section is wrong. I have the command to repair the vehicles in SA-MP, but don't repair, that I write /fix and send me the message Fixed Vehicle, but the car does not repair the damage left with ... know how? here's the code pawn and sorry my English i'm italian.
if ( strcmp ( cmdtext , "/fix", true)==0)
{
new State=GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
RepairVehicle(vehicleid);
SendClientMessage(playerid,COLOR_GREEN,"Vehicle Fixed!");
}
else
{
SendClientMessage(playerid,COLOR_BLUE,"You aren't in any vehicle.");
}
return 1;
}
if ( strcmp ( cmdtext , "/fix", true)==0)
{
new State=GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
RepairVehicle(vehicleid);
SendClientMessage(playerid,COLOR_GREEN,"Vehicle Fixed!");
}
else
{
SendClientMessage(playerid,COLOR_BLUE,"You aren't in any vehicle.");
}
return 1;
}