11.07.2012, 21:35
Just remove it:
Now it will lock for everybody, also who used command.
pawn Код:
if(i != playerid)
{
}
pawn Код:
if(strcmp(cmdtext, "/lock", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State = GetPlayerState(playerid);
new Float:X, Float:Y, Float:Z;
// ^
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1056,X,Y,Z);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
}
return 1;
}