SetVehicleHealth help :)
#1

Hello samp forums

i got this

Код:
	if (strcmp("/crash", cmdtext, true, 10) == 0)
	{
		SetVehicleHealth(vehicleid, 100);
        SendClientMessage(playerid,1,"Your vehicle has been Destroyed.");
		return 1;
	}
but it gives me this fail when i compile

error 017: undefined symbol "vehicleid"


whats wrong

ps i want to set the vehiclehealth to 100 so the car explodes
Reply
#2

vehicleid -> GetPlayerVehicleID(playerid);
Reply
#3

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
Reply
#4

pawn Код:
if (strcmp("/crash", cmdtext, true, 10) == 0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
   
    SetVehicleHealth(vehicleid, 100);
    SendClientMessage(playerid,1, "Your vehicle has been Destroyed.");
    return 1;
}
Edit: Too slow because of the flood protection =/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)