[Help] Command
#1

problem fixed thanks to Clive
Reply
#2

pawn Код:
if (strcmp("/light", cmdtext, true, 10) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if (IsNotAEngineCar(newcar))
            {
            return 1;
            }
            if(GetVehicleParameters(newcar, 1) == 1)
            {
             SetVehicleLights(newcar, 0);
             GameTextForPlayer(playerid, "~w~Lights~n~~r~Off", 4000, 3);
            }
            else if(GetVehicleParameters(newcar, 1) == 0)
            {
                SetVehicleLights(newcar, 1);
                GameTextForPlayer(playerid, "~w~Lights~n~~g~On", 4000, 3);
            }
        } else return SendClientMessage(playerid,-1,"Error: you are not in a vehicle");
    }
    return 1;
}
Reply
#3

thanks btw that sendclientmessage there is a -1 what that means ?
Reply
#4

Quote:
Originally Posted by Jimbo01
Посмотреть сообщение
thanks btw that sendclientmessage there is a -1 what that means ?
White colour.
Reply
#5

i tested it it says that im not in a vehicle ? but I'am
Reply
#6

Quote:
Originally Posted by Jimbo01
Посмотреть сообщение
i tested it it says that im not in a vehicle ? but I'am
Post edited try again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)