totalled cars & teams/skins help
#4

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
For the totalled car system, you canf irst get the vehicle's health using GetVehicleHealth and then after that use SetVehicleParamsEx to switch off it's engine

For the addplayerclass thing, I guess you can make an array with all the id's and then process it 1 by 1 in the addplayerclass function
Thank you so much. I just don't know how to use this. "GetVehicleHealth"
Can you give one example?

Here's the engine cmd
Quote:
Код:
dcmd_engine(playerid, params[])
{
#pragma unused params
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective, playername[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, playername, sizeof(playername));
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(!IsPlayerInAnyVehicle(playerid))
    return SendClientMessage(playerid, COLOR_RED, "[ERROR] You must be in a vehicle in order to use this command.");
if(GetPlayerVehicleSeat(playerid) != 0)
return SendClientMessage(playerid, COLOR_RED, "[ERROR] You must be in the driver seat in order to use this command.");
if(engine == 1)
{
	SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid, COLOR_YELLOW, "[VEHICLE] Engine shut off.");
}
else
{
    SetVehicleParamsEx(vehicleid,1,lights,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid, COLOR_YELLOW, "[VEHICLE] Engine started.");
}
return 1;
}
Edit: About the skins, I will try.
Reply


Messages In This Thread
totalled cars & teams/skins help - by Uberanwar - 07.09.2013, 04:59
Re: totalled cars & teams/skins help - by Uberanwar - 07.09.2013, 05:48
Re: totalled cars & teams/skins help - by [HK]Ryder[AN] - 07.09.2013, 05:52
Re: totalled cars & teams/skins help - by Uberanwar - 07.09.2013, 06:31
Re: totalled cars & teams/skins help - by [HK]Ryder[AN] - 07.09.2013, 07:21
Re: totalled cars & teams/skins help - by Uberanwar - 07.09.2013, 07:46

Forum Jump:


Users browsing this thread: 1 Guest(s)