[24/02/2018 14:48:01] [debug] #0 002de31c in public OnPlayerStateChange (0, 1,
[24/02/2018 14:49:44] [debug] #0 002ac48c in public SSCANF_OnPlayerDisconnect (0, 1) from GRP.amx
[24/02/2018 14:49:44] [debug] #1 00039d3c in public _y_utils_OnPlayerDisconnect (0, 1) from GRP.amx
[24/02/2018 14:49:44] [debug] #2 0000af60 in ?? (0, 1, 0, 0, 0, 8, 0, 1, 0, 0, ... <1073741813 arguments>) from GRP.amx
[24/02/2018 14:49:44] [debug] #3 0000f118 in public OnPlayerDisconnect (0, 1) from GRP.amx
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(GettingSpectated[playerid] != -1)
{
new spectator = GettingSpectated[playerid];
if(!IsPlayerConnected(spectator))
{
GettingSpectated[playerid] = -1;
Spectate[spectator] = -1;
}
if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[spectator][pAdmin] >= 2 || newstate == PLAYER_STATE_PASSENGER && PlayerInfo[spectator][pAdmin] >= 2)
{
TogglePlayerSpectating(spectator, true);
new carid = GetPlayerVehicleID(playerid);
PlayerSpectateVehicle(spectator, carid);
}
else if(newstate == PLAYER_STATE_ONFOOT && PlayerInfo[spectator][pAdmin] >= 2)
{
TogglePlayerSpectating(spectator, true);
PlayerSpectatePlayer(spectator, playerid);
SetPlayerInterior(spectator, GetPlayerInterior(playerid));
}
}
// Benzin Sistemi
if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
new vid = GetPlayerVehicleID(playerid);
new string[125];
format(string,sizeof string,"",fuel[vid]);
// TextDrawSetString(td_fuel[playerid],string);
TextDrawShowForPlayer(playerid,td_fuel[playerid]);
}
else
{
TextDrawHideForPlayer(playerid,td_fuel[playerid]);
}
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && (!IsAVipCar(vehicleid) || GetVehicleModel(vehicleid) != 481 || GetVehicleModel(vehicleid) != 509 || GetVehicleModel(vehicleid) != 510))
{
SetPVarInt(playerid, "fuelonoff", 1);
textdrawscount++;
}
if((newstate == 2 || newstate == 3 || newstate == 7 || newstate == 9) && pTazer[playerid] == 1)
{
RemovePlayerWeapon(playerid, 23);
GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000);
pTazer[playerid] = 0;
}
if(newstate == PLAYER_STATE_ONFOOT)
{
if(MP3Station[playerid] == 0)
{
StopAudioStreamForPlayer(playerid);
}
else
{
new
t = MP3Station[playerid]-1;
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[t][radiourl]);
}
if(GettingSpectated[playerid] < MAX_PLAYERS && PlayerInfo[GettingSpectated[playerid]][pAdmin] >= 2)
{
new spectator = GettingSpectated[playerid];
// Preventing possible buffer overflows with the arrays
TogglePlayerSpectating(spectator, true);
PlayerSpectatePlayer(spectator, playerid);
SetPlayerInterior(spectator, GetPlayerInterior(playerid));
SetPlayerInterior(spectator, GetPlayerInterior(playerid));
SetPlayerVirtualWorld(spectator, GetPlayerVirtualWorld(playerid));
}
if(ConnectedToPC[playerid] == 1337)//mvb
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* MVB'den зıkış yaptın.");
ConnectedToPC[playerid] = 0;
}
if(RadarActive[playerid] == 1)//mvb speed radar
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* MVB Hız radarını kapattın.");
RadarActive[playerid] = 0;
TextDrawDestroy(RadarTitle[playerid]);
TextDrawDestroy(RadarContext[playerid]);
}
if(TransportDuty[playerid] > 0)
{
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
TransportDuty[playerid] = 0;
new string[42];
format(string, sizeof(string), "* İşbaşından зıktın ve $%d kazandın.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerCash(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1;
TransportValue[playerid] = 0;
TransportMoney[playerid] = 0;
SetPlayerColor(playerid, TEAM_HIT_COLOR);
TransportTime[playerid] = 0;
TransportCost[playerid] = 0;
}
if(TransportDriver[playerid] < MAX_PLAYERS && AdminDuty[playerid] == 0)
{
new string[128];
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
format(string, sizeof(string), "~w~Taksi ucreti~n~~r~$%d",TransportCost[playerid]);
GameTextForPlayer(playerid, string, 5000, 3);
format(string, sizeof(string), "~w~Musteri taksiden ayrildi~n~~g~Kazanilan $%d",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], string, 5000, 3);
GivePlayerCash(playerid, -TransportCost[playerid]);
new ip[32], ipex[32];
GetPlayerIp(playerid, ip, sizeof(ip));
GetPlayerIp(TransportDriver[playerid], ipex, sizeof(ipex));
TaxiWarn[playerid][TransportDriver[playerid]] += TransportCost[playerid];
if(TaxiWarn[playerid][TransportDriver[playerid]] >= 10000)
{
format(string, sizeof(string), "%s (IP:%s), %s (IP:%s)'ı istediği yere gцtьrdь ve $%d kazandı.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(TransportDriver[playerid]), ipex, TaxiWarn[playerid][TransportDriver[playerid]]);
//Log("logs/pay.log", string);
ABroadCast(COLOR_YELLOW, string, 1);
}
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
TransportCost[playerid] = 0;
TransportTime[playerid] = 0;
TransportDriver[playerid] = -1;
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
}
if(newstate == PLAYER_STATE_WASTED)
{
if(GetPVarInt(playerid, "EventToken") == 0 && AdminDuty[playerid] == 0)
{
SetPVarInt(playerid, "DoktorMasrafi", 1);
}
}
if(newstate == PLAYER_STATE_PASSENGER)
{
fVehSpeed[playerid] = 0;
gLastCar[playerid] = vehicleid;
if(PlayerInfo[playerid][pGuns][4] > 0) SetPlayerArmedWeapon(playerid,PlayerInfo[playerid][pGuns][4]);
else SetPlayerArmedWeapon(playerid,0);
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, 1);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
}
}
if(VehicleRadioStation[GetPlayerVehicleID(playerid)] != 0)
{
new getradio = VehicleRadioStation[GetPlayerVehicleID(playerid)]-1;
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[getradio][radiourl]);
}
foreach(new i : Player)
{
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0 && AdminDuty[playerid] == 0)
{
if(GetPlayerCash(playerid) < TransportValue[i])
{
new string[128];
format(string, sizeof(string), "Binebilmek iзin $%d'a ihtiyacın var.", TransportValue[i]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
RemovePlayerFromVehicle(playerid);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z+2);
TogglePlayerControllable(playerid, 1);
}
else
{
new string[128];
if(TransportDuty[i] == 1 && AdminDuty[playerid] == 0)
{
format(string, sizeof(string), "* Taksi şofцrьne $%d para цdedin.", TransportValue[i]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s adlı mьşteri taksi aracınıza bindi.", GetPlayerNameEx(playerid));
SendClientMessage(i, COLOR_LIGHTBLUE, string);
TransportTime[i] = 1;
TransportTime[playerid] = 1;
TransportCost[playerid] = TransportValue[i];
TransportCost[i] = TransportValue[i];
TransportDriver[playerid] = i;
}
else if(TransportDuty[i] == 2)
{
format(string, sizeof(string), "* Taksi şofцrьne $%d para цdedin.", TransportValue[i]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s adlı mьşteri taksi aracınıza bindi.", GetPlayerNameEx(playerid));
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
GivePlayerCash(playerid, - TransportValue[i]);
TransportMoney[i] += TransportValue[i];
}
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
fVehSpeed[playerid] = 0;
SetPlayerArmedWeapon(playerid, 0);
if(VehicleRadioStation[GetPlayerVehicleID(playerid)] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "{66CCFF}Radyo Istasyonu: Yok - {66CCFF}Tьr:{66CCFF} Yok {FF0000} (/radyoac)");
SendClientMessage(playerid, COLOR_WHITE, "{66CCFF}Aracınızı зalıştırmak iзin (/amotor) komutunu ve [N] tuşunu kullanabilirsiniz.");
if(!PlayerInfo[playerid][pCarLic]) SendClientMessage(playerid, COLOR_LIGHTRED, " Ehliyetin yok, polislere dikkat etmelisin.");
SendClientMessage(playerid, COLOR_WHITE, "{66CCFF}Aracınızın icinde (/emniyetkemeri) komutunu kullanabilirsiniz. ");
}
if(VehicleRadioStation[GetPlayerVehicleID(playerid)] != 0)
{
new getradio = VehicleRadioStation[GetPlayerVehicleID(playerid)]-1;
PlayAudioStreamForPlayer(playerid, VehicleRadioListing[getradio][radiourl]);
new genre[18];
if(getradio >= 0 && getradio <= 9) genre = "Alternatif";
new string[128];
format(string, sizeof(string), "{66CCFF}Radyo Istasyonu: %s - {66CCFF}Tьr:{66CCFF} %s {FF0000} (/radyoac)", VehicleRadioListing[getradio][radioname], genre);
SendClientMessage(playerid, COLOR_WHITE, string);
}
new
newcar = GetPlayerVehicleID(playerid),
v;
gLastCar[playerid] = newcar;
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, 1);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
}
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
if(GetCarDealershipVehicleId(newcar) != -1 && GetCarDealershipVehicleId(newcar) == GetPVarInt(playerid, "editingcdveh")) return 1;
if(GetCarDealershipVehicleId(newcar) != -1)
{
new string[57 + 20 + 4];
format(string, sizeof(string),"Bu %s model aracı almak ister misin?\n\nBu aracın fiyatı $%d.", GetVehicleName(newcar), CarDealershipInfo[GetCarDealershipId(newcar)][cdVehicleCost][GetCarDealershipVehicleId(newcar)]);
ShowPlayerDialogEx(playerid,DIALOG_CDBUY,DIALOG_STYLE_MSGBOX,"Uyarı:",string,"Satın Al","Iptal");
TogglePlayerControllable(playerid, false);
return 1;
}
foreach(new i : Player)
{
v = GetPlayerVehicle(i, newcar);
if(v != -1)
{
if(i == playerid)
{
new
string[96];
format(string, sizeof(string),"Bu %s model aracın sahibisin.", GetVehicleName(newcar));
SendClientMessage(playerid, COLOR_GREY, string);
if(PlayerVehicleInfo[i][v][pvTicket] != 0)
{
format(string, sizeof(string),"Aracına LSPD memurları tarafından $%d'lık bir ceza bırakılmış. Dillimore'deki DMV'den bu cezayı цdemek zorundasın.", PlayerVehicleInfo[i][v][pvTicket]);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_GREY, "Bu cezayı цdemezsen aracın bağlanabilir, hatta hapse bile girebilirsin.");
}
}
else if(i == PlayerInfo[playerid][pVehicleKeysFrom])
{
new
string[64 + MAX_PLAYER_NAME];
format(string, sizeof(string),"Modeli %s olan bu aracın anahtarlarına sahipsin. Sahibi: %s", GetVehicleName(newcar), GetPlayerNameEx(i));
SendClientMessage(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] < 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(64, 100, 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));
SendClientMessage(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][pGang] == f)
{
format(string, sizeof(string), "%s model aracın sahibi olan ailedensin.", GetVehicleName(newcar));
SendClientMessage(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(64, 100, 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;
}
}
if(IsACopCar(vehicleid))
{
if(PlayerInfo[playerid][pFaction] == 1||PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "LSPD'den değilsin!");
}
}
else if(IsAFBICar(vehicleid))
{
if(PlayerInfo[playerid][pFaction] == 2||PlayerInfo[playerid][pLeader] == 2)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "FBI'dan değilsin.");
}
}
else if(vehicleid == LSFMDVehicles[12] || vehicleid == LSFMDVehicles[33] || vehicleid == LSFMDVehicles[34] || vehicleid == LSFMDVehicles[35])
{
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pDivision] == 3)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "Yangın Departmanı biriminde değilsin.");
}
}
else if(vehicleid == TemizlikVehicles[0] || vehicleid == TemizlikVehicles[1] || vehicleid == TemizlikVehicles[2] || vehicleid == TemizlikVehicles[3] || vehicleid == TemizlikVehicles[4] || vehicleid == TemizlikVehicles[5] || vehicleid == TemizlikVehicles[6] || vehicleid == TemizlikVehicles[7])
{
if(PlayerInfo[playerid][pJob] == 23 || PlayerInfo[playerid][pJob2] == 23)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "Temizlikзi değilsin.");
}
}
else if(vehicleid == TirVehicles[0] || vehicleid == TirVehicles[1] || vehicleid == TirVehicles[2] || vehicleid == TirVehicles[3] || vehicleid == TirVehicles[4] || vehicleid == TirVehicles[5] || vehicleid == TirVehicles[6] || vehicleid == TirVehicles[7] || vehicleid == TirVehicles[8] || vehicleid == TirVehicles[9] || vehicleid == TirVehicles[10] || vehicleid == TirVehicles[11])
{
if(PlayerInfo[playerid][pJob] == 22 || PlayerInfo[playerid][pJob2] == 22)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "Tir şofцrь değilsin.");
}
}
else if(vehicleid == LSFMDVehicles[13] || vehicleid == LSFMDVehicles[16] || vehicleid == LSFMDVehicles[36] || vehicleid == LSFMDVehicles[37] || vehicleid == LSFMDVehicles[38] || vehicleid == LSFMDVehicles[39] || vehicleid == LSFMDVehicles[40])
{
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pDivision] == 2)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "Hayat uзuşu biriminde değilsin.");
}
}
else if(IsANewsVeh(vehicleid))
{
if(PlayerInfo[playerid][pFaction] == 9||PlayerInfo[playerid][pLeader] == 9)
{
if(GetVehicleModel(vehicleid) == 488 && PlayerInfo[playerid][pRank] < 3)
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "Bu helikopteri uзurabilmek iзin en az R3 olman gerek.");
}
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "San Andreas Haberleri oluşumunda değilsin!");
}
}
else if(IsAGovCar(vehicleid))
{
if(PlayerInfo[playerid][pFaction] == 5||PlayerInfo[playerid][pLeader] == 5)
{
}
else
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid, COLOR_GRAD2, "GOV'dan değilsin.");
}
}
else if(IsAPlane(vehicleid))
{
if(PlayerInfo[playerid][pFlyLic] != 1)
{
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
defer NOPCheck(playerid);
SendClientMessage(playerid,COLOR_GREY,"Pilot belgen yok!");
}
}
else if(IsAHelicopter(vehicleid))
{
PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
GivePlayerValidWeapon(playerid, 46, 60000);
}
else if(IsAnTaxi(vehicleid) || IsAnBus(vehicleid))
{
if(PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17)
{
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Taksici yada otobьs şofцrь değilsin!");
RemovePlayerFromVehicle(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz);
}
}
}
if(newstate == PLAYER_STATE_SPAWNED)
{
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
//gPlayerSpawned[playerid] = 1;
}
return 1;
}
Please post just codes on OnPlayerStateChange under u check newstate == PLAYER_STATE_ONFOOT or newstate == 1.
More info, as iKarim said... If you're going to post info, then don't just post half of it.