11.01.2011, 23:22
You will need to create a variable.
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
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;
}