Would this work?
#1

pawn Код:
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;
}
I currently cant test it right now but would it work.

Also, Can someone explain to me what the bonnet,boot,objective is?
Reply
#2

Yes, that would work.

bonnet = hood
boot = trunk
objective = the yellow arrow on top of the vehicle
Reply
#3

Quote:
Originally Posted by antonio112
Посмотреть сообщение
Yes, that would work.

bonnet = hood
boot = trunk
objective = the yellow arrow on top of the vehicle
Okay thank you. One more thing. I want to do /engine to turn on, and /engine to turn off. How would i do so.

Heres my code.

pawn Код:
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;
}
SCM is SendClientMessage
Reply
#4

Try this:

pawn Код:
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;
}
Reply
#5

Quote:
Originally Posted by Onyewu
Посмотреть сообщение
Try this:

pawn Код:
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;
}
Okay, And Finally, (I know im a pain)

How can i disable the real chat. Not really disable it fully but it only sends to players that are near
Reply
#6

return 0 onplayertext
Reply
#7

No.
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;
}
Something like that
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)