PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new string[128];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
if (IsAtPGarbage(playerid))
{
if(newkeys == KEY_CROUCH)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[playerid][pMaskUse] == 1)
{
format(sendername, sizeof(sendername), "[Mask_%d_38]", RandMask[playerid]);
}
new dice = random(15)+1;
ClearAnimations(playerid);
if(dice == 1)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a dirty Burger Shot Hamburger.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a dirty old half eaten hamburger, Throw it away!");
}
else if(dice == 2)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a used condom.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found s used condom!");
}
else if(dice == 3)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a hotdog.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a hotdog!");
new Float:PlayersArmour;
GetPlayerHealth(playerid, PlayersArmour);
SetPlayerHealthExs(playerid, PlayersArmour + 5.0);
}
else if(dice == 4)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a Banana Peal.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a Banana Peal");
}
else if(dice == 5)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a dead rat.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a dead rat!");
}
else if(dice == 6)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a used dildo.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a dildo!");
GivePlayerWeaponEx(playerid,10,1);
}
else if(dice == 7)
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds a broken pool cue.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found a pool cue!");
GivePlayerWeaponEx(playerid,7,1);
}
else
{
format(string, sizeof(string), "* %s leans over and picks threw the garbage and finds nothing of value.", sendername);
SendClientMessage(playerid,COLOR_GRAD3,"You found nothing!");
}
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
// Place Bomb
ApplyAnimationEx(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
return 1;
}
}
if(((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE)) || ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)) || (newkeys & KEY_FIRE)) {
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && playerid != i && !IsPlayerNPC(i)) {
if(IsPlayerAiming(playerid, i)) {
if(PlayerInfo[playerid][pMember] == 1 && GetPlayerWeapon(playerid) == 23 || PlayerInfo[playerid][pMember] == 2 && GetPlayerWeapon(playerid) == 23 || PlayerInfo[playerid][pMember] == 14 && GetPlayerWeapon(playerid) == 23 || PlayerInfo[playerid][pGuard] == 1 && GetPlayerWeapon(playerid) == 23) {
if(IsPlayerInAnyVehicle(i) || IsPlayerInAnyVehicle(i)) {
return 0;
}
//SetPlayerHealth(i, 0); GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* %s shoots with there Tazer which hooks onto %s and tazes him to the ground.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(i, 0);
GameTextForPlayer(i, "~p~(Tazed)", 3000, 3);
GameTextForPlayer(playerid, "~r~(Tazed) Complete", 3000, 3);
SetTimerEx("FallPlayer", 1000, 0, "d", i);
SetTimerEx("UnTaze",20000, 0, "d",i);
SetPlayerDrunkLevel(i, 3000);
// SetPlayerHealth(i,100);
Usinganim[i] = 1;
Tazed[i] = 1;
return 1;
}
}
}
}
if (((newkeys & KEY_WALK && newkeys & KEY_UP) || (newkeys & KEY_WALK && newkeys & KEY_DOWN) || (newkeys & KEY_WALK && newkeys & KEY_LEFT) || (newkeys & KEY_WALK && newkeys & KEY_RIGHT))
|| ((oldkeys & KEY_WALK && newkeys & KEY_UP) || (oldkeys & KEY_WALK && newkeys & KEY_DOWN) || (oldkeys & KEY_WALK && newkeys & KEY_LEFT) || (oldkeys & KEY_WALK && newkeys & KEY_RIGHT))
|| ((newkeys & KEY_WALK && oldkeys & KEY_UP) || (newkeys & KEY_WALK && oldkeys & KEY_DOWN) || (newkeys & KEY_WALK && oldkeys & KEY_LEFT) || (newkeys & KEY_WALK && oldkeys & KEY_RIGHT))
&& GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
walktime[playerid] = SetTimerEx("WalkAnim",200,0,"d",playerid);
}
if(newkeys == KEY_SPRINT || newkeys == KEY_FIRE || newkeys == KEY_CROUCH)
{
if(RegistrationStep[playerid] == 5 || RegistrationStep[playerid] == 4)
{
RegistrationStep[playerid]=5;
}
}
if(newkeys & KEY_FIRE && oldkeys & KEY_CROUCH && IsCbugWeapon(playerid))
{
if(PlayerInfo[playerid][pAdmin] <= 9)
{
ApplyAnimationEx(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
}
}
if(oldkeys & KEY_FIRE && newkeys & KEY_CROUCH && IsCbugWeapon(playerid))
{
if(PlayerInfo[playerid][pAdmin] <= 9)
{
ApplyAnimationEx(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
}
}
if(PRESSED(KEY_SPRINT))
{
if(PlayerisTut[playerid] >= 1)
{
if(PlayerisTut[playerid] == 1)
{
PlayerisTut[playerid] = 2;
SetPlayerPos(playerid,1279.6980,-1542.4175,13.5274);
SetPlayerCameraPos(playerid,1299.7954,-1594.4066,35.6015);//Driving School
SetPlayerCameraLookAt(playerid,1279.6980,-1542.4175,13.5274);
format(string,sizeof(string),"Driving school ~n~You will be able to take a driving test here for 5000$");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 2)
{
PlayerisTut[playerid] = 3;
SetPlayerPos(playerid, 1221.7010,-1328.6449,-5.00);
SetPlayerCameraPos(playerid, 1204.3781,-1313.3323,16.3984);
SetPlayerCameraLookAt(playerid, 1174.7167,-1323.4485,14.5938);
format(string,sizeof(string),"If you're feeling sick~n~come to the hospital~n~to get healed and fixed by the EMS");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 3)
{
PlayerisTut[playerid] = 4;
SetPlayerPos(playerid,590.7849,-1243.1808,17.9521);
SetPlayerCameraPos(playerid,609.0580,-1219.5914,29.2979);//Bank
SetPlayerCameraLookAt(playerid,590.7849,-1243.1808,17.9521);
format(string,sizeof(string),"Bank is located here~n~You can get your paychecks by~n~going over to the money icon~n~COMMANDS:/withdraw,/savings,/deposit,/transfer");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 4)
{
PlayerisTut[playerid] = 5;
SetPlayerPos(playerid,543.6426,-1277.8851,17.2422);
SetPlayerCameraPos(playerid,538.1927,-1259.2106,29.4667);//Grotti Dealership
SetPlayerCameraLookAt(playerid,543.6426,-1277.8851,17.2422);
format(string,sizeof(string),"You can buy sport vehicles over here if you have enough money.~n~Command:/v.");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 5)
{
PlayerisTut[playerid] = 6;
SetPlayerCameraPos(playerid,2125.4453,-1119.0323,37.1580);
SetPlayerCameraLookAt(playerid,2131.0527,-1150.2542,24.1689);
SetPlayerPos(playerid,2130.0605,-1119.6272,25.3773);
format(string,sizeof(string),"Over here is the other dealership where you can buy non-sport cars.~n~/v for commands");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 6)
{
PlayerisTut[playerid] = 7;
SetPlayerPos(playerid, 1786.1758,-1258.4976,-5.00);
SetPlayerCameraPos(playerid, 1779.4259,-1275.1025,15.6328);
SetPlayerCameraLookAt(playerid, 1785.7263,-1296.0200,13.4213);
format(string,sizeof(string),"Here is where you can make advertisements ~n~So if you need to make a advertisement.~n~ Come down and /ad or /cad~n~For company advertisement. ");
TextDrawSetString(Textdraw98[playerid],string);
TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
return 1;
}
if(PlayerisTut[playerid] == 7)
{
PlayerisTut[playerid] = 0;
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1642.2334,-2240.4983,13.4952);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
TextDrawHideForPlayer(playerid,Textdraw98[playerid]);
OnPlayerDataSave(playerid);
SetCameraBehindPlayer(playerid);
SendClientMessage(playerid,COLOR_WHITE,"{FF6633}Tutorial:{FFFFFF}The tutorial is now finished,good luck!.");
return 1;
}
}
}
if(PRESSED(LIGHT_KEY))
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0)
{
if(GetPVarInt(playerid, "CopFlash") == 0)
{
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
switch(GetPVarInt(playerid, "vMainOn"))
{
case 0:
{
lights = encode_lights(0, 0, 0, 0);
SetPVarInt(playerid, "vMainOn", 1);
}
case 1:
{
lights = encode_lights(1, 1, 1, 1);
SetPVarInt(playerid, "vMainOn", 0);
}
}
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
}
}
}
if(PRESSED(KEY_CROUCH))
{
if(IsPublicService(GetPlayerVehicleID(playerid)) && GetPlayerVehicleSeat(playerid) == 0)
{
switch(GetPVarInt(playerid, "CopFlash"))
{
case 0:
{
KillTimer(BlinkTime[playerid]);
BlinkTime[playerid] = SetTimerEx("vBlinker", PFLASH_RATE, 1, "i", playerid);
SetPVarInt(playerid, "CopFlash", 1);
}
case 1:
{
KillTimer(BlinkTime[playerid]);
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
lights = encode_lights(1, 1, 1, 1);
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
SetPVarInt(playerid, "CopFlash", 0);
}
}
}
}
if(PRESSED(KEY_LOOK_LEFT))
{
if(GetPlayerVehicleSeat(playerid) == 0)
{
if(GetPVarInt(playerid, "vBLeft") == 0)
{
KillTimer(BlinkTime[playerid]);
BlinkTime[playerid] = SetTimerEx("vBlinker", BLINK_RATE, 1, "i", playerid);
SetPVarInt(playerid, "vBLeft", 1);
SetPVarInt(playerid, "vBRight", 0);
}
else
{
KillTimer(BlinkTime[playerid]);
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
switch(GetPVarInt(playerid, "vMainOn"))
{
case 0:
{
lights = encode_lights(1, 1, 1, 1);
}
case 1:
{
lights = encode_lights(0, 0, 0, 0);
}
}
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
SetPVarInt(playerid, "vBLeft", 0);
}
}
}
if(PRESSED(KEY_LOOK_RIGHT))
{
if(GetPlayerVehicleSeat(playerid) == 0)
{
if(GetPVarInt(playerid, "vBRight") == 0)
{
KillTimer(BlinkTime[playerid]);
BlinkTime[playerid] = SetTimerEx("vBlinker", BLINK_RATE, 1, "i", playerid);
SetPVarInt(playerid, "vBRight", 1);
SetPVarInt(playerid, "vBLeft", 0);
}
else
{
KillTimer(BlinkTime[playerid]);
new panels, doors, lights, tires;
new carid = GetPlayerVehicleID(playerid);
GetVehicleDamageStatus(carid, panels, doors, lights, tires);
switch(GetPVarInt(playerid, "vMainOn"))
{
case 0:
{
lights = encode_lights(1, 1, 1, 1);
}
case 1:
{
lights = encode_lights(0, 0, 0, 0);
}
}
UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
SetPVarInt(playerid, "vBRight", 0);
}
}
return 1;
}
else if(newkeys == KEY_SPRINT)
{
if(BenchPressTime[playerid] > 0)
{
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
else if(BenchPresses[playerid] > 0)
{
if(BenchPresses[playerid] >= 1 && BenchPresses[playerid] <= 99 && PlayerInfo[playerid][IsUsingWeight] == 1 && IsInMovingTime[playerid] == 0)
{
PlayerInfo[playerid][pPower]+=5.000000;
TextDrawDestroy(MovingBox[playerid]);
MovingBox[playerid] = TextDrawCreate(PlayerInfo[playerid][pPower], 182.000000, "~n~");
TextDrawBackgroundColor(MovingBox[playerid], 255);
TextDrawFont(MovingBox[playerid], 1);
TextDrawLetterSize(MovingBox[playerid], 0.900000, 0.499999);
TextDrawColor(MovingBox[playerid], -1717986817);
TextDrawSetOutline(MovingBox[playerid], 0);
TextDrawSetProportional(MovingBox[playerid], 1);
TextDrawSetShadow(MovingBox[playerid], 1);
TextDrawUseBox(MovingBox[playerid], 1);
TextDrawBoxColor(MovingBox[playerid], -1);
TextDrawTextSize(MovingBox[playerid], 502.000000, 0.000000);
TextDrawShowForPlayer(playerid,MovingBox[playerid]);
if(PlayerInfo[playerid][pPower] >= 586.000000)
{
ApplyAnimation(playerid,"benchpress","gym_bp_up_A", 4.0, 0, 0, 0, 1, 0);SetTimerEx("DownObject",2900,false,"u",playerid);
IsInMovingTime[playerid] = 1;
PlayerInfo[playerid][pReps]+=1;
TextDrawDestroy(RepsText[playerid]);
format(string,sizeof(string),"Reps: %d",PlayerInfo[playerid][pReps]);
RepsText[playerid] = TextDrawCreate(520.000000, 200.000000, string);
TextDrawBackgroundColor(RepsText[playerid], 255);
TextDrawFont(RepsText[playerid], 2);
TextDrawLetterSize(RepsText[playerid], 0.500000, 1.000000);
TextDrawColor(RepsText[playerid], -1);
TextDrawSetOutline(RepsText[playerid], 1);
TextDrawSetProportional(RepsText[playerid], 1);
TextDrawShowForPlayer(playerid,RepsText[playerid]);
}
else
{
if(BenchPresses[playerid] >= 99 && PlayerInfo[playerid][IsUsingWeight] == 1 && IsInMovingTime[playerid] == 0)
{
ApplyAnimation(playerid,"benchpress","gym_bp_getoff", 4.0, 0, 0, 1, 1, 1);SetTimerEx("GetUp",2900,false,"u",playerid);
KillTimer(ReduceTimer[playerid]);
PlayerInfo[playerid][pPower] = 506.000000;
PlayerInfo[playerid][pReps] = 0;
IsInMovingTime[playerid] = 0;
PlayerInfo[playerid][IsUsingWeight] = 0;
TextDrawHideForPlayer(playerid,RepsText[playerid]);
TextDrawHideForPlayer(playerid,Box1[playerid]);
TextDrawHideForPlayer(playerid,Box2[playerid]);
TextDrawHideForPlayer(playerid,MovingBox[playerid]);
SetCameraBehindPlayer(playerid);
SetTimerEx("BenchPressFinish", 7000, false, "i", playerid);
}
}
}
}
}
else if(newkeys & KEY_FIRE)
{
new wep = GetPlayerWeapon(playerid);
if(wep == 38)
{
if(PlayerInfo[playerid][pAdmin] <= 9)
{
RemovePlayerWeaponEx(playerid, wep);
ApplyAnimationEx(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
}
}
else if(BenchPresses[playerid] > 0 && PlayerInfo[playerid][IsUsingWeight] == 1 && IsInMovingTime[playerid] == 0)
{
ApplyAnimation(playerid,"benchpress","gym_bp_getoff", 4.0, 0, 0, 1, 1, 1);SetTimerEx("GetUp",2900,false,"u",playerid);
KillTimer(ReduceTimer[playerid]);
PlayerInfo[playerid][pPower] = 506.000000;
PlayerInfo[playerid][pReps] = 0;
IsInMovingTime[playerid] = 0;
PlayerInfo[playerid][IsUsingWeight] = 0;
TextDrawHideForPlayer(playerid,RepsText[playerid]);
TextDrawHideForPlayer(playerid,Box1[playerid]);
TextDrawHideForPlayer(playerid,Box2[playerid]);
TextDrawHideForPlayer(playerid,MovingBox[playerid]);
SetCameraBehindPlayer(playerid);
SetTimerEx("BenchPressFinish", 7000, false, "i", playerid);
}
/* else if(newkeys == KEY_JUMP)
{
if(IsPlayerConnected(playerid))
{
if(VehAsk[playerid] == 0)
{
return 1;
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
{
return 1;
}
if (IsNotAEngineCar(idcar))
{
return 1;
}
if(idcar >= 135 && idcar <= 154)
{
if(HireCar[playerid] != idcar)
{
return 1;
}
}
if(idcar >= 1 && idcar <= 9)
{
if(HireCar[playerid] != idcar)
{
return 1;
}
}
if(IsAnOwnableCar(idcar))
{
if(PlayerInfo[playerid][pCarkey] == VehicleOwned[idcar])
{
}
else if(PlayerInfo[playerid][pCarkey2] == VehicleOwned[idcar])
{
}
else if(PlayerInfo[playerid][pCarkey3] == VehicleOwned[idcar])
{
}
else
{
return 1;
}
}
if(ReduceTime[playerid] > 0)
{
format(string, sizeof(string), " You need to wait %d seconds to type this command.", ReduceTime[playerid]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[playerid][pMaskUse] == 1)
{
format(sendername, sizeof(sendername), "[Mask_%d_38]", RandMask[playerid]);
}
if (VehicleEngine[idcar] == 0)
{
format(string, sizeof(string), "* %s spins the %s's key into the ignition and turns on the engine.", sendername, VehicleName[GetVehicleModel(idcar)-400]);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new RandomStart;
RandomStart = random(4);
switch(RandomStart)
{
case 0,1,2:
{
if(VehAsk[playerid] == 1)
{
VehAsk[playerid] = 0;
TogglePlayerControllable(playerid,true);
}
VehicleEngine[idcar] = 1;
format(string, sizeof(string), "* %s engine starts (( %s ))", VehicleName[GetVehicleModel(idcar)-400], sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
case 3:
{
format(string, sizeof(string), "* %s engine does not start (( %s ))", VehicleName[GetVehicleModel(idcar)-400], sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ReduceTime[playerid] = 3;
}
}
}
}
}*/
else if(((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE)) || ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)) || (newkeys & KEY_FIRE))
{
if(IsPlayerAiming(playerid))
{
if(GetPlayerWeapon(playerid) == 24 || GetPlayerWeapon(playerid) == 30 || GetPlayerWeapon(playerid) == 31 && GetPlayerAmmo(playerid) > 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i == playerid) continue;
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
if(IsPlayerAimingTargetBodyPart(playerid, i, 1)) // BODY_PART_HEAD
{ DoDamage(playerid, i, 1, GetPlayerWeapon(playerid)); }
else if(IsPlayerAimingTargetBodyPart(playerid, i, 2)) // BODY_PART_TORSO
{ DoDamage(playerid, i, 2, GetPlayerWeapon(playerid)); }
else if(IsPlayerAimingTargetBodyPart(playerid, i, 3)) // BODY_PART_LEGS
{ DoDamage(playerid, i, 3, GetPlayerWeapon(playerid)); }
}
}
}
}
}
}
return 1;
}
else if(newkeys == KEY_SECONDARY_ATTACK)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(VehAsk[playerid] == 1)
{
VehAsk[playerid] = 0;
TogglePlayerControllable(playerid,true);
RemovePlayerFromVehicle(playerid);
}
}
}
}