16.04.2009, 10:03
I know it's kinda off-topic but you wrote too many lines! and made things that could lag your server....
just do this:
just do this:
pawn Код:
if (!strcmp(cmdtext, "/lock", true))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle!");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),playerid, 0, 1);
SendClientMessage(playerid, COLOR_GREY, "Vehicle locked!");
PlayerPlaySound(playerid,1056,0,0,0);
return 1;
}