CMD:engine(playerid,params[])
{
new vid;
vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
SCM(playerid,COLOR_LIGHTRED,"Your vehicle has started!");
return 1;
}
Yes, that would work.
bonnet = hood boot = trunk objective = the yellow arrow on top of the vehicle |
CMD:engine(playerid,params[])
{
new vid;
vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,true,lights,alarm,doors,bonnet,boot,objective);
SCM(playerid,COLOR_LIGHTRED,"The Vehicle Has Started!");
return 1;
}
CMD:engine(playerid,params[])
{
new vid;
vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if (engine) {
SetVehicleParamsEx(vid,0,lights,alarm,doors,bonnet,boot,objective);
SCM(playerid,COLOR_LIGHTRED,"Engine shut down!");
} else {
SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
SCM(playerid,COLOR_LIGHTRED,"The Vehicle Has Started!");
}
return 1;
}
Try this:
pawn Код:
|
public OnPlayerText(playerid, text[])
{
new String[128], name[24], Float:X, Float:Y, Float:Z;
GetPlayerName(playerid, name, sizeof name);
GetPlayerPos(playerid, X, Y, Z);
format(String, sizeof String, "%s says: %s", name, text);
foreach (Player,i)
{
if(IsPlayerInRangeOfPoint(i, 30, X, Y, Z))
{
SendClientMessage(i, -1, String);
return 1;
}
}
return 0;
}