05.11.2011, 20:47
(
Последний раз редактировалось Dirkon; 05.11.2011 в 20:50.
Причина: wrong title
)
Hey, this is my vehicle locking CMD, but I don't understand why if I lock my vehicle engine turns off?
pawn Код:
if(!strcmp(cmdtext,"/lock",true))
{
new carid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
for(new i = 0; i < MAX_VEHICLES; i++)
{
new Float:px, Float:py, Float:pz;
GetPlayerPos(playerid, px, py, pz);
if(VehicleToPoint(5, i, px, py, pz))
{
new IsOwner[MAX_PLAYER_NAME];
GetPlayerName(playerid, IsOwner, sizeof(IsOwner));
if(strmatch(CarInfo[i][owner], IsOwner))
{
SetVehicleParamsEx(i,engine,lights,alarm,1,bonnet,boot,objective);
}
}
}
return 1;
}