26.08.2011, 13:54
Quote:
lol.. i wanted to ask the same but i dont want to kill the player i want the player he shoot will not get hitted ( the vehicle will not explode and the player will not loose health)
so can you tell me how can i do somthing like this? (it will be useless if i will make another thread like that,just with other torget :\) |
Quote:
errors :- |
EDIT: I just figured out that all vehicles shoots with CTRL. Try this
You can remove 'SetPVarInt(playerid, "vehicleID", vehicleid);' at OnPlayerEnterVehicle
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new vehicleid = GetPlayerVehicleID(playerid);
model = GetVehicleModel(vehicleid);
if(IsPlayerInAnyVehicle(playerid))
{
if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
{
switch(model)
{
case 425, 432, 464, 476, 520:
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, -1, "You have been killed because you dmed");
}
}
}
}
return 1;
}