17.03.2009, 17:40
the command /lock is only locking the vehicle to the player who type /lock..
it isnt locking for others players -.-
anyone knows how to fix it?
it isnt locking for others players -.-
anyone knows how to fix it?
Quote:
if(strcmp(cmd, "/lock", true) == 0) { new carid=GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(VehicleLocked[carid] == 0) { if(PlayerInfo[playerid][pSex] == 1) { PlayerActionMessage(playerid,15.0,"trancou as portas do seu veнculo."); } else { PlayerActionMessage(playerid,15.0,"trancou as portas do seu veнculo."); } SendClientMessage(playerid,COLOR_LIGHTYELLOW2,"Veн culo Trancado"); VehicleLocked[carid] = 1; VehicleLockedPlayer[playerid] = carid; } } else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { new Float,Float:y,Float:z; if(VehicleLockedPlayer[playerid] != 999) { GetVehiclePos(VehicleLockedPlayer[playerid], x, y, z); } if(VehicleLocked[VehicleLockedPlayer[playerid]]) { if(PlayerToPoint(5.0,playerid,x,y,z)) { if(PlayerInfo[playerid][pSex] == 1) { PlayerActionMessage(playerid,15.0,"destrancou as portas do seu veнculo."); } else { PlayerActionMessage(playerid,15.0,"destrancou as portas do seu veнculo."); } SendClientMessage(playerid,COLOR_LIGHTYELLOW2,"Veн culo Destrancado"); VehicleLocked[VehicleLockedPlayer[playerid]] = 0; VehicleLockedPlayer[playerid] = 999; } else { SendClientMessage(playerid,COLOR_LIGHTYELLOW2,"Nгo estбs num veнculo!"); } } } return 1; } |