Please take a look - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Please take a look (
/showthread.php?tid=87901)
Please take a look -
Takumi.WS - 22.07.2009
Код:
if(strcmp("/repair", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehicleHealth(vehicleid, 1000.0);
SendClientMessage(playerid, COLOR_YELLOW, "Car is now repaired");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "You are not in a vehicle");
}
return 1;
}
1 error, undefined symbol "vehicleid"

can anyone help ?
Re: Please take a look -
refshal - 22.07.2009
pawn Код:
new Vehicle;
Vehicle = GetPlayerVehicleID(playerid);
SetVehicleHealth(Vehicle, 1000.0);
Re: Please take a look -
Takumi.WS - 22.07.2009
Quote:
Originally Posted by еddy
pawn Код:
new Vehicle; Vehicle = GetPlayerVehicleID(playerid); SetVehicleHealth(Vehicle, 1000.0);
|
Thx for the answer
But the command isn't working in game
Re: Please take a look -
MenaceX^ - 22.07.2009
pawn Код:
if(!strcmp(cmdtext,"/repair",true))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,color,"You have to be inside a vehicle.");
else
{
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
return SendClientMessage(playerid,color,"Your vehicle was healed.");
}
return 1;
}