IsValidDoor
From Onset Developer Wiki
Description
Checks whether a given door identifier is a valid door.
Syntax
IsValidDoor(door)
Parameters
- door
The dooridentifier to check.
Return Value
- Returns true on success.
Example
AddCommand("destroydoor", function(playerid, doorid)
doorid = tonumber(doorid)
if IsValidDoor(doorid) then
return AddPlayerChat(playerid, "Invalid door Id specified.")
end
DestroyDoor(doorid)
AddPlayerChat(playerid, "You destroyed the door ("..doorid..")")
return
end)