Help me :p
#1

Anyone can give me the wiki guide for this kind of scripts?

i want a script that i use F to /enter in my house, biz or building.
So, basicly i want when i type F in the entrances, i get the same thing of /enter or /exit.

Anmyone who give me a link or an example i will appreciate.

Tryed to find in wiki samp but i didnt found :/
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys==KEY_SECONDARY_ATTACK)
  {
    OnPlayerCommandText(playerid,"/enter");
  }
  return 1;
}
Reply
#3

i just need to add that?

EDIT: i added and it gives me that OnPlayerKeyStateChange simbol already defines (error 021)


what should i do?

and this will make the same thing as to /exit?
Reply
#4

alright forget my noob post

Damn i'm getting warning with loose identification, and i cant fixx it with TAB..
Any tip?

Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys==KEY_SECONDARY_ATTACK)
{
OnPlayerCommandText(playerid,"/enter");
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (newkeys & KEY_SECONDARY_ATTACK)
{
if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
{
RemoveDriverFromVehicle(playerid);
}
if(OutOfFuel[playerid])
{
RemoveDriverFromVehicle(playerid);
OutOfFuel[playerid] = 0;
}
}
}
return 1;
}

Reply
#5

Then fix the identitation.
Reply
#6

I cant find how to fiz it, i'm putting tabs in all lines and it is doing the same error -.-
Reply
#7

loose identiation isn't en error.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys==KEY_SECONDARY_ATTACK)
  {
    OnPlayerCommandText(playerid,"/enter");
  }
  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
    if (newkeys & KEY_SECONDARY_ATTACK)
    {
      if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
      {
        RemoveDriverFromVehicle(playerid);
      }
      if(OutOfFuel[playerid])
      {
        RemoveDriverFromVehicle(playerid);
        OutOfFuel[playerid] = 0;
      }
    }
    return 1;
  }
Have fun.
Reply
#8

Not working that gives me too many error
Reply
#9

Fixed, ty vm
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)