Hey i need some help again..
#1

ok so there is /car on my server.. people spawn rhino.. hydra.. sea sparrow and try to DM..


Is there a way to Detect if there in a Rhino/hydra/sea sparrow and the CRTL or Fire button is pressed?
Reply
#2

Yes
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  new string[128];
  if(newkeys & 4 | newkeys & 2) // Fire Button or Crounch
  {
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
      {
          new model = GetVehicleModel(GetPlayerVehicleID(playerid));
          if(model == 432 || model == 520 || model == 447)
          //  Rhino         Hydra      Seaspawrrow
          {
                        new model_name[12];
                        if(model == 432) model_name = "Rhino";
                        else if(model == 520) model_name = "Hydra";
                        else if(model == 447) model_name = "Seasparrow";
            format(string,sizeof string,"Fire button pressed from vehicleid %i - %s ",model,model_name);
            SendClientMessage(playerid,0xFFFFFFFF,string);
          }
    }
  }
}
Reply
#3

thx 4 teh help!


Edit: Tested and they keys are off :S...

Fire button works..

But CRTL button doesnt do anything.. does anybody know a big sexy list of keys?
Reply
#4

Quote:
Originally Posted by © HungryPinkPig ©
thx 4 teh help!


Edit: Tested and they keys are off :S...

Fire button works..

But CRTL button doesnt do anything.. does anybody know a big sexy list of keys?
SA-MP wiki knows it.. :P
http://wiki.sa-mp.com
Reply
#5

Or just check your a_samp.inc
It contains all key defines
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)