Quote:
Originally Posted by [FU]Victious
onvehiclespawn or onplayerupdate
pawn Код:
for(new i; i<MAX_PLAYERS; i++) { SetVehicleParamsForPlayer(VEHICLEIDHERE, i, 1, 0); }
|
Ok i did this and it didnt work
heres the code this is in OnPlayerStateChange
Код:
if(CarAlarm[vehi][caalarm] >= 4 && VehAsk[playerid] == 2) {
for(new i; i<MAX_PLAYERS; i++)
{
SetVehicleParamsForPlayer(vehi, i, 1, 0);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new st[256];
//new Float:VPosX,Float:VPosY,Float:VPosZ;
//GetVehiclePos(key1[playerid],VPosX,VPosY,VPosZ);
format(string, sizeof(string), "*[Vehicle alarm]:BEEP! BEEP! BEEP! BEEP!");
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string,sizeof(string),"SMS:Vehicle %s alarm is activated,Sender: MOLE (555)",VehicleNames[GetVehicleModel(vehi)-400]);
SendClientMessage(playerid, 0xE7D5ADFF, string);
SetVehicleParamsForPlayerEx(vehi,playerid,1,1);
//iVehicleObjective[vehi][0] = 1; //Marker
//iVehicleObjective[vehi][1] = 0; //Door Lock
//CarLabel5 = Create3DTextLabel("Vehicle Alarm is on!" ,COLOR_YELLOW,VPosX,VPosY,VPosY+3,15.0,0);
//Attach3DTextLabelToVehicle(CarLabel5,key1[playerid],0.0, 0.0, 0.0);
format(st, sizeof(st), "HQ: Crime:Vehicle Alarm has been activated, Suspect Robbing: %s",name);
SendFamilyMessage(1, COLOR_DBLUE, st);
SetPVarInt(playerid, "VehON", 0);
AlarmTime[playerid] = SetTimerEx("Alarm", FLASH_TIME, 1, "i", playerid);
Stop[playerid] = SetTimerEx("Chill",SHUTDOWN,false,"i",playerid);
return 1;
}
}