To make one command
#2

You will need to create a variable.

pawn Код:
new bonnetvar[MAX_PLAYERS]; //top of the script
if (strcmp("/bonnet", cmdtext, true, 10) == 0)
{
       if(bonnetvar[playerid] == 0)
       {
              GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
              SetVehicleParamsEx(carid,engine,lights,alarm,doors,false,boot,objective);
              bonnetvar[playerid] = 1;
       }
       else
       {
                GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(carid,engine,lights,alarm,doors,false,boot,objective);
                bonnetvar[playerid] = 0;
       }
       return 1;
}
Something like that should hopefully work, if i did something wrong you could work it out with this thread https://sampforum.blast.hk/showthread.php?tid=189464
Reply


Messages In This Thread
To make one command - by Roma555 - 11.01.2011, 22:42
Re: To make one command - by Haydz - 11.01.2011, 23:22
Re: To make one command - by Roma555 - 11.01.2011, 23:29
Re: To make one command - by Haydz - 11.01.2011, 23:31
Re: To make one command - by Steven82 - 12.01.2011, 01:08

Forum Jump:


Users browsing this thread: 1 Guest(s)