/lock command
#1

now in the 0.3 version, how its work?
i know with OnVehicleStreamIn, but it does not work.

my command:

pawn Код:
if (strcmp(cmdtext, "/lock", true) == 0)
  {
  if(IsPlayerInAnyVehicle(playerid))
  {
  new State=GetPlayerState(playerid);
  if(State!=PLAYER_STATE_DRIVER)
  {
  SendClientMessage(playerid,gelb,"You can look the doors only you are the driver.");
  return 1;
  }
  new i;
  for(i=0;i<MAX_PLAYERS;i++)
  {
  if(i != playerid)
  {
  SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  }
  }
  SendClientMessage(playerid, gelb, "Vehicle look");
  new Float:pX, Float:pY, Float:pZ;
  GetPlayerPos(playerid,pX,pY,pZ);
  PlayerPlaySound(playerid,1056,pX,pY,pZ);
  locked[playerid][GetPlayerVehicleID(playerid)] = 1;
  }
  else
  {
  SendClientMessage(playerid, rot, "You don't are in a Vehicle!");
  }
  return 1;
  }
callback:

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  vehid[forplayerid] = vehicleid;
  return 1;
}
Reply


Messages In This Thread
/lock command - by Headshot1108 - 20.02.2010, 18:31
Re: /lock command - by VonLeeuwen - 20.02.2010, 18:33
Re: /lock command - by Headshot1108 - 20.02.2010, 18:36
Re: /lock command - by Headshot1108 - 20.02.2010, 19:33
Re: /lock command - by smeti - 21.02.2010, 00:42
Re: /lock command - by Headshot1108 - 21.02.2010, 12:39
Re: /lock command - by MadeMan - 21.02.2010, 12:58
Re: /lock command - by Headshot1108 - 21.02.2010, 17:58

Forum Jump:


Users browsing this thread: 2 Guest(s)