08.05.2018, 14:56
PHP код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.DL-R1, (C)2005-2018 SA-MP Team
[21:51:28]
[21:51:28] Server Plugins
[21:51:28] --------------
[21:51:28] Loading plugin: crashdetect
[21:51:28] CrashDetect v4.17 is OK.
[21:51:28] Loaded.
[21:51:28] Loading plugin: streamer
[21:51:28]
*** Streamer Plugin v2.9.1 by Incognito loaded ***
[21:51:28] Loaded.
[21:51:28] Loading plugin: sscanf
[21:51:28]
[21:51:28] ===============================
[21:51:28] sscanf plugin loaded.
[21:51:28] Version: 2.8.2
[21:51:28] (c) 2012 Alex "******" Cole
[21:51:28] ===============================
[21:51:28] Loaded.
[21:51:28] Loading plugin: audio
[21:51:28]
*** Audio Plugin v0.5 R2 by Incognito loaded ***
[21:51:28] Loaded.
[21:51:28] Loading plugin: Whirlpool
[21:51:28]
[21:51:28] ==================
[21:51:28]
[21:51:28] Whirlpool loaded
[21:51:28]
[21:51:28] ==================
[21:51:28]
[21:51:28] Loaded.
[21:51:28] Loading plugin: nativechecker
[21:51:28] Loaded.
[21:51:28] Loaded 6 plugins.
[21:51:28]
[21:51:28] Ban list
[21:51:28] --------
[21:51:28] Loaded: samp.ban
[21:51:28]
[21:51:28]
[21:51:28] Filterscripts
[21:51:28] ---------------
[21:51:28] Loading filterscript 'int.amx'...
[21:51:28] Loading filterscript 'Buttons.amx'...
[21:51:29] Loaded 2 filterscripts.
[21:51:29]
[21:51:29] =======================================
[21:51:29] | |
[21:51:29] | YSI version 1.03.0011 |
[21:51:29] | By Alex "******" Cole |
[21:51:29] | |
[21:51:29] | Checking the latest YSI version.. |
[21:51:29] | |
[21:51:29] =======================================
[21:51:29]
[21:51:29] *** Audio Plugin: Started TCP server on port 7777
[21:51:29] Memuat Database Business Server...
[21:51:29] Memuat Database Stock Server...
[21:51:29] CYBER: Memuat data Harga.ini ..... [SELESAI]
[21:51:29] Loading Black Market Data.....
[21:51:29] Loading Garage Data.....
[21:51:29] Memuat Database TurfWars Server...
[21:51:29] Memuat Database Event Points Server...
[21:51:29] Memuat Database Dynamic Doors Server...
[21:51:29] Memuat Database Dynamic Map Icons Server...
[21:51:29] Memuat Database House Server...
[21:51:29] Gates loaded successfully.
[21:51:29] Memuat Database Workshop Server...
[21:51:29] Buypoint Berhasil Dimuat
[21:51:29] Memuat Database Dynamic Objects Server...
[21:51:29] Memuat Database Stuff Server...
[21:51:29] Memuat Database Server Stats Server...
[21:51:29] Memuat Database Families Server...
[21:51:29] Memuat Database Points Server...
[21:51:29] Memuat Database Dynamic Objects Server...
[21:51:29] [System] Board loaded successfully.
[21:51:29] Load Dealership
[21:51:34] Memuat Database Families HQ Server...
[21:51:34] Memuat Database Motd Server...
[21:51:34] [SCRIPT] 3DTEXTDRAW LIMIT: 1024 (Static, non-streamed) | 3DTEXTDRAW COUNT: 101
[21:51:34] [SCRIPT] PICKUP LIMIT: 4096 (Static, non-streamed) | PICKUP COUNT: 66
[21:51:34] [SCRIPT] OBJECT LIMIT: 1000 (Static, non-streamed) | OBJECT COUNT: 6056
[21:51:34]
-------------------------------------------
[21:51:34] National Life Project Roleplay
[21:51:34] Copyright (C) National Life Project Roleplay, LLC (2018)
[21:51:34] All Rights Reserved
[21:51:34] -------------------------------------------
[21:51:34] Berhasil memulai Gamemode...
[21:51:34] Number of vehicle models: 57
[21:51:34]
[21:51:34] =======================================
[21:51:34] | |
[21:51:34] | Error: Could not connect to YSI |
[21:51:34] | update server (response was 404). |
[21:51:34] | |
[21:51:34] =======================================
[21:51:34]
[21:51:54] [connection] incoming connection: 192.168.0.3:60560 id: 0
[21:51:54] [join] Lance_Hatteberg has joined the server (0:192.168.0.3)
[21:52:02] Lance_Hatteberg has logged in.
[21:52:02] Lance_Hatteberg has logged in.
[21:52:02] Loading Lance_Hatteberg's vehicles.
[21:52:02] Loading all vehicles mods.
[21:52:02] Loading Vehicle Object.
[21:52:02] [debug] Run time error 4: "Array index out of bounds"
[21:52:02] [debug] Attempted to read/write array element at negative index -400
[21:52:02] [debug] AMX backtrace:
[21:52:02] [debug] #0 0015d49c in public avt_OnPlayerStateChange (0, 8, 0) from Roleplay.amx
[21:52:02] [debug] #1 00016380 in public OnPlayerStateChange (0, 8, 0) from Roleplay.amx
[21:52:02] [debug] Run time error 4: "Array index out of bounds"
[21:52:02] [debug] Attempted to read/write array element at negative index -400
[21:52:02] [debug] AMX backtrace:
[21:52:02] [debug] #0 0015d49c in public avt_OnPlayerStateChange (0, 1, 8) from Roleplay.amx
[21:52:02] [debug] #1 00016380 in public OnPlayerStateChange (0, 1, 8) from Roleplay.amx
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
//OnAngkotPlayerStateChange(playerid, newstate, oldstate);
OnTaxiPlayerStateChange(playerid, newstate, oldstate);
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsHaulingCar(vehicleid) != -1) {
HaulingCarTimer[IsHaulingCar(vehicleid)] = 0;
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(IsHaulingCar(GetPlayerVehicleID(playerid)) != -1)
{
/*if(PlayerJobInfo[playerid][pjHaulingDelay] > 0) {
RemovePlayerFromVehicle(playerid);
new str[256];
format(str, sizeof(str), "[Hauling]{FFFFFF} Silahkan menunggu {FFFF00}%d detik{FFFFFF} lagi, untuk menggunakan job hauling kembali", PlayerJobInfo[playerid][pjHaulingDelay]);
return SendClientMessageEx(playerid, COLOR_LIGHTGREEN, str);
}*/
if(pHaulingRoute[playerid] != -1) {
pHaulingTimer[playerid] = 0;
}
if(pHaulingRoute[playerid] == -1) {
SendClientMessageEx(playerid, COLOR_LIGHTGREEN, "[Hauling]{FFFFFF} Silahkan ambil muatan truk di dekat anda");
}
}
}
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
if(pHaulingRoute[playerid] != -1) {
pHaulingTimer[playerid] = 15;
GameTextForPlayer(playerid, "~y~Hauling Fail~w~~n~dalam waktu ~y~15~w~ detik", 1000, 5);
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
OnVehicleShowroomFunction(playerid);
}
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
if(GetPVarInt(playerid, "ShowroomCarEdit") == 1)
{
new s = GetPVarInt(playerid, "ShowroomCarEdit");
DeletePVar(playerid, "ShowroomCarEdit");
new v = GetVehicleShowroomID(GetPlayerVehicleID(playerid));
SetVehiclePos(ShowroomVehicleInfo[s][v][srvId], ShowroomVehicleInfo[s][v][srvPos][0], ShowroomVehicleInfo[s][v][srvPos][1], ShowroomVehicleInfo[s][v][srvPos][2]);
SetVehicleZAngle(ShowroomVehicleInfo[s][v][srvId], ShowroomVehicleInfo[s][v][srvPos][3]);
}
}
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(playerid, 0);
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
ShowVehicleHUDForPlayer(playerid);
}
if(newstate != PLAYER_STATE_DRIVER && newstate != PLAYER_STATE_PASSENGER)
{
HideVehicleHUDForPlayer(playerid);
}
if(newstate != 2) NOPTrigger[playerid] = 0;
if(IsPlayerNPC(playerid))
{
if(newstate == PLAYER_STATE_SPECTATING)
{
TogglePlayerSpectating(playerid, false);
}
return 1;
}
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
if(IsValidObject(semnalizari[GetPVarInt(playerid, "VehLamp")][0])) DestroyObject(semnalizari[GetPVarInt(playerid, "VehLamp")][0]); semnalizari[GetPVarInt(playerid, "VehLamp")][0] = INVALID_OBJECT_ID;
if(IsValidObject(semnalizari[GetPVarInt(playerid, "VehLamp")][2])) DestroyObject(semnalizari[GetPVarInt(playerid, "VehLamp")][2]); semnalizari[GetPVarInt(playerid, "VehLamp")][2] = INVALID_OBJECT_ID;
semnalizareron[GetPVarInt(playerid, "VehLamp")] = 0;
semnalizarelon[GetPVarInt(playerid, "VehLamp")] = 0;
}
if(newstate == PLAYER_STATE_DRIVER)
{
ShowVehicleHUDForPlayer(playerid);
pvehicleid[playerid] = GetPlayerVehicleID(playerid);
pmodelid[playerid] = GetVehicleModel(pvehicleid[playerid]);
}
else {
pvehicleid[playerid] = 0;
pmodelid[playerid] = 0;
}
if(GettingSpectated[playerid] != 999)
{
new spectator = GettingSpectated[playerid];
if(!IsPlayerConnected(spectator))
{
GettingSpectated[playerid] = 999;
Spectate[spectator] = 999;
}
if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[spectator][pAdmin] >= 1 || newstate == PLAYER_STATE_PASSENGER && PlayerInfo[spectator][pAdmin] >= 1)
{
TogglePlayerSpectating(spectator, true);
new carid = GetPlayerVehicleID( playerid );
PlayerSpectateVehicle( spectator, carid );
SetPVarInt(spectator, "SpecState", newstate);
}
else if(newstate == PLAYER_STATE_ONFOOT && PlayerInfo[spectator][pAdmin] >= 1)
{
TogglePlayerSpectating(spectator, true);
PlayerSpectatePlayer( spectator, playerid );
SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
SetPVarInt(spectator, "SpecState", newstate);
}
}
if(newstate == PLAYER_STATE_ONFOOT)
{
if(Audio_IsClientConnected(playerid))
{
Audio_Stop(playerid, stationidp[playerid]);
stationidp[playerid] = 0;
}
new spectator = GettingSpectated[playerid];
if(PlayerInfo[spectator][pAdmin] >= 1) {
// Preventing possible buffer overflows with the arrays
TogglePlayerSpectating(spectator, true);
PlayerSpectatePlayer( spectator, playerid );
SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
SetPVarInt(spectator, "SpecState", newstate);
SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
SetPlayerVirtualWorld( spectator, GetPlayerVirtualWorld( playerid ) );
}
if(oldstate == PLAYER_STATE_DRIVER)
{
SetPlayerWeaponsEx(playerid);
}
else if(oldstate == PLAYER_STATE_PASSENGER) SetPlayerWeaponsEx(playerid);
if(ConnectedToPC[playerid] == 1337)//mdc
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are now logged off the MDC.");
ConnectedToPC[playerid] = 0;
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
}
if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
{
if(stationidv[GetPlayerVehicleID(playerid)] != 0)
{
new station[64];
switch(stationidv[GetPlayerVehicleID(playerid)])
{
case 1: format(station, sizeof(station), "http://216.246.109.162:8000");
case 2: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1415249");
case 3: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1415249");
case 4: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1628721");
case 5: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
case 6: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1628932");
case 7: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1756658");
case 8: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
case 9: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057197");
case 10: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=18695");
case 11: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=412093");
case 12: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=181367");
case 13: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275071");
case 14: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=412093");
case 15: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356");
case 16: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1279013");
case 17: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
case 18: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280855");
case 19: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1116397");
case 20: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057543");
case 21: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366");
case 22: format(station, sizeof(station), "http://38.107.220.164:8014");
case 23: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=847066");
}
if(Audio_IsClientConnected(playerid))
{
Audio_Stop(playerid, stationidp[playerid]);
stationidp[playerid] = Audio_PlayStreamed(playerid, station, false, true, false);
}
}
new vehicleid = GetPlayerVehicleID(playerid);
if( GetPVarInt( playerid, "ToBeEjected" ) >= 1 )
{
SetPVarInt( playerid, "ToBeEjected", 0 );
RemovePlayerFromVehicle( playerid );
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z+2);
if(GetPVarInt(playerid, "Injured") == 1)
{
Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));
ClearAnimations(playerid);
LoopingAnim(playerid,"KNIFE","KILL_Knife_Ped_Die",4.0,0,1,1,1,0);
}
}
//SetPVarInt(playerid, "LastWeapon", GetPlayerWeapon(playerid));
gLastCar[playerid] = vehicleid;
}
if(newstate == PLAYER_STATE_WASTED)
{
if(GetPVarInt(playerid, "EventToken") == 0)
{
SetPVarInt(playerid, "MedicBill", 1);
}
if(ConnectedToPC[playerid] == 1337)//mdc
{
ConnectedToPC[playerid] = 0;
}
Seatbelt[playerid] = 0;
}
if(newstate == PLAYER_STATE_DRIVER)
{
if(stationidv[GetPlayerVehicleID(playerid)] != 0)
{
new station[64];
switch(stationidv[GetPlayerVehicleID(playerid)])
{
case 1: format(station, sizeof(station), "http://216.246.109.162:8000");
case 2: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1415249");
case 3: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1415249");
case 4: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1628721");
case 5: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283687");
case 6: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1628932");
case 7: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1756658");
case 8: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
case 9: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057197");
case 10: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=18695");
case 11: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=412093");
case 12: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=181367");
case 13: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275071");
case 14: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=412093");
case 15: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356");
case 16: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1279013");
case 17: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
case 18: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280855");
case 19: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1116397");
case 20: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057543");
case 21: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366");
case 22: format(station, sizeof(station), "http://38.107.220.164:8014");
case 23: format(station, sizeof(station), "http://yp.shoutcast.com/sbin/tunein-station.pls?id=847066");
}
if(Audio_IsClientConnected(playerid))
{
Audio_Stop(playerid, stationidp[playerid]);
stationidp[playerid] = Audio_PlayStreamed(playerid, station, false, true, false);
}
}
new
newcar = GetPlayerVehicleID(playerid),
engine, lights, alarm, doors, bonnet, boot, objective, v;
gLastCar[playerid] = newcar;
SetPVarInt(playerid, "VehLamp", GetPlayerVehicleID(playerid));
foreach(Player, i) {
v = GetPlayerVehicle(i, newcar);
if(v != -1) {
if(i == playerid) {
new
string[96];
format(string, sizeof(string),"Anda pemilik %s ini.", GetVehicleName(newcar));
SendClientMessageEx(playerid, COLOR_GREY, string);
if(PlayerVehicleInfo[i][v][pvTicket] != 0)
{
format(string, sizeof(string),"(%s) surat tilang ada di kendaraan anda. Anda harus membayarnya di tempat Insurance.", FormatMoney(PlayerVehicleInfo[i][v][pvTicket]));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
if(PlayerVehicleInfo[i][v][pvImpounded] == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "[IMPOUND] Kendaraan anda telah disita oleh L.S.P.D");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
else if(i == PlayerInfo[playerid][pVehicleKeysFrom]) {
new
string[64 + MAX_PLAYER_NAME];
format(string, sizeof(string),"Anda memiliki kunci %s ini dari pemiliknya %s.", GetVehicleName(newcar), GetPlayerNameEx(i));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
else if(PlayerVehicleInfo[i][v][pvLocked] == 1 && PlayerVehicleInfo[i][v][pvLock] == 1) {
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 20000, 0, "d", newcar);
}
else if(PlayerVehicleInfo[i][v][pvLocked] == 1 && PlayerVehicleInfo[i][v][pvLock] == 2) {
new
string[49 + MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 1)
{
format(string, sizeof(string), "* %s has been stunned by the electric anti-theft.",GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new Float:X, Float:Y, Float:Z, Float:HP;
GetPlayerPos(playerid, X, Y, Z);
SendAudioToRange(10300, 100, 0, X, Y, Z, 20.0);
SetPlayerPos(playerid, X + 1, Y, Z);
RemovePlayerFromVehicle(playerid);
SetPVarInt(playerid, "IsFrozen", 1);
TogglePlayerControllable(playerid,0);
SetTimerEx("ReleasePlayer", 10000, 0, "d", playerid);
GameTextForPlayer(playerid,"~r~STUNNED!",11000,3);
GetPlayerHealth(playerid,HP);
SetPlayerHealth(playerid,HP-15);
}
else
{
format(string, sizeof(string), "Warning: This %s is owned by %s.", GetVehicleName(newcar), GetPlayerNameEx(i));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
}
return 1;
}
}
for(new f = 0; f < MAX_FAMILY; f++) {
v = GetGangVehicle(f, newcar);
if(v != -1) {
new string[49 + MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pFMember] == f)
{
format(string, sizeof(string), "You are in the family that owns this %s.", GetVehicleName(newcar));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
else if(FamilyVehicleInfo[f][v][fvLocked] == 1 && FamilyVehicleInfo[f][v][fvLock] == 1)
{
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(newcar,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 20000, 0, "d", newcar);
}
else if(FamilyVehicleInfo[f][v][fvLocked] == 1 && FamilyVehicleInfo[f][v][fvLock] == 2)
{
format(string, sizeof(string), "* %s has been stunned by the electric anti-theft.",GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new Float:X, Float:Y, Float:Z, Float:HP;
GetPlayerPos(playerid, X, Y, Z);
SendAudioToRange(10300, 100, 0, X, Y, Z, 20.0);
SetPlayerPos(playerid, X + 1, Y, Z);
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
SetPVarInt(playerid, "IsFrozen", 1);
TogglePlayerControllable(playerid,0);
SetTimerEx("ReleasePlayer", 10000, 0, "d", playerid);
GameTextForPlayer(playerid,"~r~STUNNED!",11000,3);
GetPlayerHealth(playerid,HP);
SetPlayerHealth(playerid,HP-15);
}
return 1;
}
}
new vehicleid = newcar;
if(IsACopCar(vehicleid))
{
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
NOPCheck(playerid);
}
}
else if(IsAnAmbulance(vehicleid))
{
if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
NOPCheck(playerid);
}
}
else if(IsANewsCar(vehicleid))
{
if(PlayerInfo[playerid][pMember] == 9 ||PlayerInfo[playerid][pLeader] == 9)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
NOPCheck(playerid);
}
}
else if(IsAHelicopter(vehicleid))
{
PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
GivePlayerValidWeapon(playerid, 46, 60000);
}
if( GetPVarInt( playerid, "ToBeEjected" ) >= 1 )
{
SetPVarInt( playerid, "ToBeEjected", 0 );
RemovePlayerFromVehicle( playerid );
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z+2);
if(GetPVarInt(playerid, "Injured") == 1)
{
Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));
ClearAnimations(playerid);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
}
}
//if(lights == VEHICLE_PARAMS_UNSET) SetVehicleParamsEx(newcar,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
//SetPVarInt(playerid, "LastWeapon", GetPlayerWeapon(playerid));
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
if((engine == VEHICLE_PARAMS_UNSET || engine == VEHICLE_PARAMS_OFF) && GetVehicleModel(newcar) != 509 && GetVehicleModel(newcar) != 481 && GetVehicleModel(newcar) != 510) {
}
else
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 481 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 509 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 510)
{
textdrawscount++;
}
}
}
if(newstate == 2)
{
if(IsADSV(GetPlayerVehicleID(playerid)))
{
new strbuy[126];
format(strbuy, sizeof(strbuy), "Anda bisa membeli kendaraan ini.\n Harga: %s", FormatMoney(GetVehicleCost(GetVehicleModel(GetPlayerVehicleID(playerid)))));
ShowPlayerDialog(playerid, DIALOG_BUYCAR, DIALOG_STYLE_MSGBOX, "Beli Kendaraan", strbuy, "Beli", "Batal");
}
}
if((newstate == 2 || newstate == 3 || newstate == 7 || newstate == 9) && pTazer[playerid] == 1)
{
GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
pTazer[playerid] = 0;
}
new newcar = GetPlayerVehicleID(playerid);
if(GetCarDealershipVehicleId(newcar) != -1 && GetCarDealershipVehicleId(newcar) == GetPVarInt(playerid, "editingcdveh")) return 1;
if(GetCarDealershipVehicleId(newcar) != -1)
{
new string[57 + 20 + 4];
format(string, sizeof(string),"Would you like to buy this {00FF00}%s?\n\nThis vehicle costs {00FFFF}%s.", GetVehicleName(newcar), FormatMoney(DealerInfo[GetCarDealershipId(newcar)][cdVehicleCost][GetCarDealershipVehicleId(newcar)]));
ShowPlayerDialog(playerid,DIALOG_CDBUY,DIALOG_STYLE_MSGBOX,"Warning:",string,"Buy","Cancel");
TogglePlayerControllable(playerid, false);
return 1;
}
if(newstate == PLAYER_STATE_SPAWNED)
{
if(ConnectedToPC[playerid] == 1337)//mdc
{
ConnectedToPC[playerid] = 0;
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
gPlayerSpawned[playerid] = 1;
SafeTime[playerid] = 60;
}
if(newstate == PLAYER_STATE_PASSENGER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(VehicleStatus{vehicleid} == 1) return SendClientMessageEx(playerid, COLOR_WHITE, "You are not allowed to enter this Shamal as it's been damaged!");
new string[47 + MAX_PLAYER_NAME];
format(string, sizeof(string), "* %s enters the Shamal airplane as a passenger.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerPos(playerid, 2.509036, 23.118730, 1199.593750);
SetPlayerFacingAngle(playerid, 82.14);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pVW] = vehicleid;
SetPlayerVirtualWorld(playerid, vehicleid);
PlayerInfo[playerid][pInt] = 1;
SetPlayerInterior(playerid, 1);
InsideShamal[playerid] = vehicleid;
SendClientMessageEx(playerid, COLOR_WHITE, "Type /exit near the door to exit the vehicle, or /window to look outside.");
}
IsPlayerSteppingInVehicle[playerid] = -1;
return 1;
}
player_remove_vip_toys(iTargetID) {
if(PlayerInfo[iTargetID][pDonateRank] >= 3) return 1;
else for(new iToyIter; iToyIter < MAX_PLAYER_ATTACHED_OBJECTS; ++iToyIter) {
for(new LoopRapist; LoopRapist < sizeof(HoldingObjectsCop); ++LoopRapist) {
if(HoldingObjectsCop[LoopRapist][holdingmodelid] == PlayerToyInfo[iTargetID][iToyIter][ptModelID]) {
PlayerToyInfo[iTargetID][iToyIter][ptModelID] = 0;
PlayerToyInfo[iTargetID][iToyIter][ptBone] = 0;
PlayerToyInfo[iTargetID][iToyIter][ptPosX] = 0.0;
PlayerToyInfo[iTargetID][iToyIter][ptPosY] = 0.0;
PlayerToyInfo[iTargetID][iToyIter][ptPosZ] = 0.0;
PlayerToyInfo[iTargetID][iToyIter][ptPosX] = 0.0;
PlayerToyInfo[iTargetID][iToyIter][ptPosY] = 0.0;
PlayerToyInfo[iTargetID][iToyIter][ptPosZ] = 0.0;
if(IsPlayerAttachedObjectSlotUsed(iTargetID, iToyIter)) RemovePlayerAttachedObject(iTargetID, iToyIter);
}
}
}
SendClientMessageEx(iTargetID, COLOR_WHITE, "All accessories/toys that were property of your former employer have been removed.");
return 1;
}