SA-MP Forums Archive
* - 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: * (/showthread.php?tid=98120)



* - Mrkrabz - 19.09.2009

*


Re: Vehicle Repair - Mike Garber - 19.09.2009

Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,KNOWNCOLOR_WHITE,"You have to be inside a vehicle.");
else
{
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
return SendClientMessage(playerid,KNOWNCOLOR_WHITE,"Vehicle Fixed.");
return 1;
}

}



Re: Vehicle Repair - Mrkrabz - 19.09.2009

Quote:
Originally Posted by mavtias
Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,KNOWNCOLOR_WHITE,"You have to be inside a vehicle.");
else
{
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
return SendClientMessage(playerid,KNOWNCOLOR_WHITE,"Vehicle Fixed.");
return 1;
}

}
Fixed it, Don't use return more than once