help in vehicle of dm +rep!! -
[M.A]Angel[M.A] - 07.08.2012
Hello, i'v stunt server and i want that if someone entered Rhino or hunter can't attack if pressed Fire and if pressed to kill them or warn them is can this be in code?
OnPlayerKeyStateChange..
I think its will be here
Re: help in vehicle of dm +rep!! -
milanosie - 07.08.2012
No, it will be in
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
But I don't think it's possible to stop them from firing rockets since rockets are Client side/GTA sided, and not server sided.
Re: help in vehicle of dm +rep!! -
[M.A]Angel[M.A] - 07.08.2012
Quote:
Originally Posted by milanosie
No, it will be in
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
But I don't think it's possible to stop them from firing rockets since rockets are Client side/GTA sided, and not server sided.
|
i dont mean to stoping them , but to kill them this is easy SetPlayerHealth(playerid,0); and client msg that You are not allowed to DM
Re: help in vehicle of dm +rep!! -
milanosie - 07.08.2012
Quote:
Originally Posted by [M.A]Angel[M.A]
i dont mean to stoping them , but to kill them this is easy SetPlayerHealth(playerid,0); and client msg that You are not allowed to DM
|
It's indeed easy, but if you know how to do it then why are you asking for help?
Respuesta: help in vehicle of dm +rep!! -
[DOG]irinel1996 - 07.08.2012
As milanosie said, it's impossible to shot at least one rocket.
You can do this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE) {
if(!IsPlayerInAnyVehicle(playerid)) return 1;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 425) { //Rhino, Hydra, Hunter
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid,-1,"In this server isn't allowed deathmach.");
}
}
return 1;
}
Best regards!
Re: Respuesta: help in vehicle of dm +rep!! -
[M.A]Angel[M.A] - 07.08.2012
Quote:
Originally Posted by irinel1996
As milanosie said, it's impossible to shot at least one rocket.
You can do this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_FIRE) { if(!IsPlayerInAnyVehicle(playerid)) return 1; if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 432 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 520 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 425) { //Rhino, Hydra, Hunter SetPlayerHealth(playerid, 0.0); SendClientMessage(playerid,-1,"In this server isn't allowed deathmach."); } } return 1; }
Best regards! 
|
ty thank you man i will test it !!
Re: help in vehicle of dm +rep!! -
[M.A]Angel[M.A] - 08.08.2012
Bro what is the key Ctrl In Samp Pawno?
Re: help in vehicle of dm +rep!! -
[DOG]irinel1996 - 08.08.2012
Check GetPlayerKeys in the wiki, you'll see the list with all keys.

Best reagards!
_________________________________
EDIT:
It's KEY_ACTION.
Default onfoot: TAB
Default in vehicle: ALT GR/LCTRL/NUM0
Re: help in vehicle of dm +rep!! -
[M.A]Angel[M.A] - 08.08.2012
Ty dude , thank you +rep!