20.02.2010, 18:31
now in the 0.3 version, how its work?
i know with OnVehicleStreamIn, but it does not work.
my command:
callback:
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;
}
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
vehid[forplayerid] = vehicleid;
return 1;
}