27.11.2012, 12:53
pawn Код:
if(strcmp(cmd, "/valarm", true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You need to be the vehicle driver, to open the hood!");
new vehicleid = GetPlayerVehicleID(playerid);
new vkey = PlayerInfo[playerid][pPcarkey];
new vkey2 = PlayerInfo[playerid][pPcarkey2];
if (valarm == 1 && vehicleid == vkey || vehicleid == vkey2)
{
new e,l,a,d,b,bo,o;
GetVehicleParamsEx(vehicleid,e,l,a,d,b,bo,o);
SetVehicleParamsEx(vehicleid,e,l,0,d,b,bo,o);
valarm = 0;
OnPropUpdate(4,vehicleid);
return 1;
}
else if (valarm == 0 && vehicleid == vkey || vehicleid == vkey2)
{
new e,l,a,d,b,bo,o;
GetVehicleParamsEx(vehicleid,e,l,a,d,b,bo,o);
SetVehicleParamsEx(vehicleid,e,l,1,d,b,bo,o);
valarm = 1;
OnPropUpdate(4,vehicleid);
return 1;
}
return 1;
}
That only works with my Vehicle ID-1? 2 Doesn't work?