SA-MP Forums Archive
[Help] Command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Command (/showthread.php?tid=217656)



[FIXED] Command - Jimbo01 - 28.01.2011

problem fixed thanks to Clive


Re: [Help] Command - HyperZ - 28.01.2011

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;
}



Re: [Help] Command - Jimbo01 - 28.01.2011

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


Re: [Help] Command - HyperZ - 28.01.2011

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


Re: [Help] Command - Jimbo01 - 28.01.2011

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


Re: [Help] Command - HyperZ - 28.01.2011

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